你好,我收到这个错误了
弃用:在第4行的/home/u578804202/public_html/includes/functions.php中不推荐使用eregi()函数
这是我的代码:
if(eregi($file,$_SERVER['REQUEST_URI'])) {
die("Sorry but you cannot access this file directly for security reasons.");
}发布于 2013-01-26 02:17:32
正如您应该看到的,它是一个旧的函数,被废弃了,相反,用户stristr()
if(stristr($_SERVER['REQUEST_URI'],$file)) {
die("Sorry but you cannot access this file directly for security reasons.");
}发布于 2013-01-26 02:26:02
您应该使用preg_match来代替:
if (!preg_match("~{$file}~i,", $_SERVER['REQUEST_URI'])) {
die("Sorry but you cannot access this file directly for security reasons.");
}https://stackoverflow.com/questions/14533137
复制相似问题