Hallo
我有这个脚本:
<?
require("lib2/config.inc.php");
require("lib2/tpl.class.php");
require("lib2/db.class.php");
require("lib2/um.class.php");
$tpl = new template("templates", "tpl");
$db = new db($db['location'], $db['username'], $db['passwort'], $db['database']);
$um = new usermanagment();
/** User login **/
$checklogin = $um->check_login();
$userdata = $um->getuserdata();
if(!$checklogin && !$guest) {
header("LOCATION: ./index2.php");
}
eval("\$header .= \" ".$tpl->get("header")."\";");
eval("\$footer .= \" ".$tpl->get("footer")."\";");
$time = time();
$db->Query("UPDATE userdaten SET lastaction = '$time' WHERE userid = '".$userdata['userid']."'");
?>
并得到这个错误:
解析错误:语法错误,意外的“;”在 /home/httpd/html/login/global.php(22) 中:第 96 行的 eval() 代码
有任何想法吗?
乍一看,错误可能出在传递给函数 eval() 的代码中。
Note:我不使用函数 eval()。它可能会导致难以发现的隐藏错误。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)