也許是不熟悉的php的一些特性吧,不過寫多了,也就慢慢適應將就了.....

這里就整理一個代碼 " /> 久久精品亚洲麻豆av一区二区,亚洲国产精品成人综合,成人午夜888

色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

PHP Parse Error: syntax error, unexpected $end 錯誤的解決辦法

這幾天寫php程序,感覺很多地方不如ASPASP.NET,jsp順手,比如session使用先得session_start();,文件跳轉header用的也不方便....

也許是不熟悉的php的一些特性吧,不過寫多了,也就慢慢適應將就了.....

這里就整理一個代碼編寫調試問題,錯誤如下:

Parse error: syntax error, unexpected $end in D:/xampp/htdocs/guestBook/guestBook.php on line 330

看看程序 330行,代碼最后一行,這有什么錯誤?google搜,找到了:

In php 5, the following error may appears as an error entry in Apache error log or simply displays on php web page, even if calling to php scripts with php_info() works perfectly and successfully returns information on php configurations:

Parse Error: syntax error, unexpected $end in ….. scripts.php on line …

The error may caused by a missing curly bracket in php script coding. Beside, it may also caused by error in php coding in class definition, as in php, a class definition cannot be broke up and distributed into multiple files, or into multiple php blocks, unless the break is within a method declaration.

But more commonly, the error is often caused by the use of Short Open tags in php,

To use short open tags, it must be enabled in php.INI. Search for short_open_tag in php.INI, and change the value to On. The line should look line:

short_open_tag = On

欺我英文不好啊?看看其它幾條搜索,都沒說到點子上,那就看看英文了,雖不能如數翻譯,大致意思是瞧明白了:

錯誤發生是使用了短標簽,可以在php.ini中設置short_open_tag = On

原來Parse error 提示一般是 語法錯誤,使用了開放的標簽,語句沒有結束 也就是編程基本的一些錯, 比如沒注意 語句結束加 ";" 或者 if(){...} 后面忘了"}" ;<?php...?>忘了"?>"。仔細檢查代碼,果然是一處漏掉了"}",修改程序正常運行

php技術PHP Parse Error: syntax error, unexpected $end 錯誤的解決辦法,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 亳州市| 上饶市| 扶余县| 梅河口市| 呈贡县| 临清市| 寿光市| 平安县| 临沂市| 荥经县| 灵石县| 金秀| 扎兰屯市| 武陟县| 平江县| 昌黎县| 天津市| 宁乡县| 吉隆县| 石嘴山市| 尚志市| 敦煌市| 岱山县| 鄂尔多斯市| 花莲市| 济阳县| 谢通门县| 普宁市| 久治县| 长治市| 玉山县| 夏邑县| 柳江县| 江北区| 武威市| 布尔津县| 尼玛县| 普定县| 桑植县| 东港市| 库尔勒市|