我得到一個消息,當我運行這段代碼:PHP EOT錯誤消息
function print_footer(){
global $file;
echo <<<EOT
<center>
<a href="$file?op=vote"> Vote </a> |
<a href="$file?op=admin"> Admin </a> |
<hr>
$copy; 2012, Shibbir Ahmed, All Rights Reserved.
</center>
</body>
</html>
EOT;
}
錯誤消息:
Parse error: syntax error, unexpected $end in D:\xampp server\xampp\htdocs\practice \function.php on line ...
什麼是錯的這個PHP代碼?
好的,很好,這是更新<<< EOT並關閉它EOT; – Babu
你確定在結尾'EOT;'之前或之後沒有空格,製表符或任何東西嗎? –
是的,我是100%^確定。 – Babu