Parse error: syntax error, unexpected ';' [closed]
Hallo
I have this script:
<?
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']."'");
?>
And get this error: Parse error: syntax error, unexpected ';' in /home/httpd开发者_如何学JAVA/html/login/global.php(22) : eval()'d code on line 96
Any ideas?
At first look you ... the error is probably in the code passed to the function eval().
Note: I do not use the function eval(). It can cause hidden mistakes, which are difficult to find.
精彩评论