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

這里就整理一個代碼 " /> 肉肉视频在线观看,日韩三级在线播放,久久精品一区二区三区av

色尼玛亚洲综合影院,亚洲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 錯誤的解決辦法,轉載需保留來源!

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

主站蜘蛛池模板: 蛟河市| 拉孜县| 曲沃县| 凌海市| 比如县| 大方县| 新营市| 承德县| 佛坪县| 古浪县| 湘潭市| 松江区| 平谷区| 安阳县| 贵德县| 龙海市| 垫江县| 彭水| 蒲江县| 资中县| 饶平县| 同德县| 收藏| 呼伦贝尔市| 浮梁县| 安丘市| 新兴县| 鞍山市| 双柏县| 大余县| 大庆市| 太白县| 武邑县| 桂东县| 彰化市| 从江县| 娱乐| 海宁市| 双牌县| 潮安县| 武宣县|