这段代码哪里错啦
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Language" Content="zh-CN"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="description" content="资源搜索页面" /> <meta name="keywords" content="资源搜索页面" /> <meta name="author" content="
http://3g.znpjw.com" /> <meta name="Copyright" content="
http://3g.znpjw.com" /> <title>资源搜索页面</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" title="style" href="../css/green.css" /></head><body> <p> <a href="./">资源免费共享中心</a>
<table border="1" width="100%" cellspacing="0" cellpadding="5"> <tr><td class="catSides"><span class="cattitle">查看资源</span></td></tr><tr><td> <?php require "config.php"; if(empty($_GET['str'])) { echo '你还没有输入搜索关键字哦'; }else{ $list =file("Lates/main.dat"); $n =count($list); $str = $_GET['str']; if($n > 0){ for ($i = 0; $i < $n; $i++) { if(eregi($str,$list[$i])){ $row =explode("
",$list[$i]); $q=1; list($name,$username,$dataname,$datadesc,$datasize,$ip,$time,$id,$datapath)=$row; echo "共享:{$username}
名称:{$dataname}
描述:{$datadesc}
大小:{$datasize}KB
来自:{$ip}
时间:{$time}
类别:<a href=\"./viewcat.php?id={$id}\">{$viewcat[$id]}</a>
点击下载
<a href=\"./Files/{$datapath}\">{$datapath}</a>"; } } } if($q!="1") { echo "如果你是无意进入此页面,请<a href='index.php'>返回首页</a>,你查找的资源已被删除或并不存在;如果你是有意进入此页面,请不要对本资源中心进行盗链操作,谢谢合作!"; } } ?> </td></tr> </table> </p> </body> </html>帮我看看
Deprecated: Function eregi() is deprecated in /home/u294072928/public_html/wp/topview.php on line 1
请指点
<?php
if (!is_dir("Files"))
mkdir("Files");
if (!is_dir("Lates"))
mkdir("Lates");
//设置文件夹
if(!is_file("Files/index.html")) {
$f = fopen("Files/index.html", "w");
fwrite($f, "\n");
fclose($f);
}
if(!is_file("Lates/index.html")) {
$f = fopen("Lates/index.html", "w");
fwrite($f, "\n");
fclose($f);
}//设置权限页
$viewcat=array("手机软件","手机游戏","手机主题","好看电影","好看电子书","好看图片","好听歌曲","其他文件"); //设置下载索引类别
$viewcatid=array("0","1","2","3","4","5","6","7");
//设置下载索引类别ID
if ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"])
{
$ip = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
}
elseif ($HTTP_SERVER_VARS["HTTP_CLIENT_IP"])
{
$ip = $HTTP_SERVER_VARS["HTTP_CLIENT_IP"];
}
elseif ($HTTP_SERVER_VARS["REMOTE_ADDR"])
{
$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}
elseif (getenv("HTTP_X_FORWARDED_FOR"))
{
$ip = getenv("HTTP_X_FORWARDED_FOR");
}
elseif (getenv("HTTP_CLIENT_IP"))
{
$ip = getenv("HTTP_CLIENT_IP");
}
elseif (getenv("REMOTE_ADDR"))
{
$ip = getenv("REMOTE_ADDR");
}
else
{
$ip = "未知!";
}
$rq = date("Y-n-j ");
$sj = date("H:i:s ");
$time = $rq."</tab>".$sj;
?>