PHP 文件意外结束
PHP Unexpected end of file
我运行它通过多个paranthesis/bracket检查器找不到任何错误我丢失了:(
function kepmentes(){
$db = new MyDB();
if(!$db){
echo $db->lastErrorMsg();
} else {
$id= getid();
$kep="kepek/" . $id . ".jpg";
move_uploaded_file($_FILES["file"]["tmp_name"], $kep);
$sql =<<<EOF
INSERT INTO Kepek (KepNev,TID) VALUES ('$kep', $id);
EOF;
$ret = $db->exec($sql);
$db->close();
}
}
您的 heredoc 结束标识符后似乎有一些空格。
来自manual:
It is very important to note that the line with the closing identifier
must contain no other characters, except a semicolon (;). That means
especially that the identifier may not be indented, and there may not
be any spaces or tabs before or after the semicolon.
我运行它通过多个paranthesis/bracket检查器找不到任何错误我丢失了:(
function kepmentes(){
$db = new MyDB();
if(!$db){
echo $db->lastErrorMsg();
} else {
$id= getid();
$kep="kepek/" . $id . ".jpg";
move_uploaded_file($_FILES["file"]["tmp_name"], $kep);
$sql =<<<EOF
INSERT INTO Kepek (KepNev,TID) VALUES ('$kep', $id);
EOF;
$ret = $db->exec($sql);
$db->close();
}
}
您的 heredoc 结束标识符后似乎有一些空格。
来自manual:
It is very important to note that the line with the closing identifier must contain no other characters, except a semicolon (;). That means especially that the identifier may not be indented, and there may not be any spaces or tabs before or after the semicolon.