PHP Parse Error: syntax error, unexpected $end PHP的解析错误:语法错误,意想不到的元月底
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:在PHP 5中,以下错误可能出现的错误进入Apache中的错误日志或干脆显示PHP的网页,即使通话PHP脚本与php_info ( )工程,完全并成功地传回的资料, PHP的配置:
Parse Error: syntax error, unexpected $end in …..解析错误:语法错误,意想不到的元月底在… .. scripts.php on line … scripts.php就行…
The error may caused by a missing curly bracket in PHP script coding.该错误可能造成的失踪曲支架在PHP脚本编码。 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.旁边,它也可能造成的错误在PHP编码在课堂上的定义,因为在PHP中,一类的定义,不能破裂,并分发到多个文件,或分成多个区块的PHP ,除非打破是一种宣言。
But more commonly, the error is often caused by the use of Short Open tags in PHP,但较为普遍,往往是错误所造成的使用短期开放标记在PHP中, instead of full tag,
To use short open tags, it must be enabled in PHP.INI.使用短开放标记,它必须启用php.ini的影响。 Search for short_open_tag in PHP.INI, and change the value to On.搜索short_open_tag在php.ini中,改变价值上。 The line should look line:线应该看看行:
short_open_tag = On short_open_tag =对
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明 :这是一个机器翻译网页是“按原样”提供的担保。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原版的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和贡献,或取得技术的支持和帮助,在 My Digital Life Forums 我的数字生活论坛 . 。
Related Articles相关文章
- WordPress MySQL SQL Query Error in WPDB Class在WordPress MySQL的SQL查询错误在wpdb级
- gmmktime Error in WordPress and MagpieRSS gmmktime误差在WordPress和magpierss
- PHP Allowed Memory Size Exchausted Fatal Error PHP的允许内存大小exchausted致命错误
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3安装Web服务器在Windows XP的Apache2 , php5和mysql4 -第3部分
- How to Customize, Modify or Change WordPress Database Connection Error Page如何自订,修改或改变的WordPress数据库连接错误页
- Comments and Comment Blocks in PHP意见和评论座在PHP
- Oracle Database Import Error 3113/3114 Oracle数据库的进口错误三千一百一十四分之三千一百十三
- Oracle ORA-14074 Create or Add New Partition Fails Error甲骨文库存- 14074创建或添加新的分区失败的错误
- Oracle EXP-00091 Error When Export Database甲骨文进出口- 00091时发生错误,进出口数据库
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files开始的Apache的httpd失败,由于无法打开,或没有这样的mod_bwlimited , mod_log_bytes或mod_bandwidth档案



















May 14th, 2006 23:30 2006年5月14日23时30分
thanks a lot,感谢了很多,
short_open_tag = On solved that problem for me short_open_tag =就解决了这个问题对我来说
August 22nd, 2006 22:49 2006年8月22日22时49分
Thanks for this post…saved me a lot of time!感谢这个职位…救了我很多时间!
December 20th, 2006 04:57 2006年12月20日4时57分
I saw your posting and made the change to the php.ini file and I’m still getting the error the is being run with Fedora Core 5 with MySql 5.我看到您的留言,并提出改变php.ini文件和我仍然收到错误的,是与正在运行的是Fedora Core 5与MySQL 5 。
Can someone please help有人可以请帮帮忙
0) 0 )
{ (
while ($row = mysql_fetch_assoc($result))而美元(连续= mysql_fetch_assoc ( $结果) )
{ (
print $row(’cust_id’) .打印元,连续( ' cust_id ' ) 。 ‘-’ . ' -' 。 $row(’cust_url_desc’) ;元,行( ' cust_url_desc ' ) ;
} )
} )
else其他的
{ (
echo ‘No rows found!’;回声'没有发现行! ' ;
} )
mysql_free_result($result); mysql_free_result ( $结果) ;
mysql_close($connection); mysql_close ( $连线) ;
?> ? >
February 5th, 2007 07:41 2007年2月5日7时41分
Hello.喂。 I have a problem with a PHP file that shows the “PHP Parse Error: syntax error, unexpected $end” error and I followed the instructions in this page and corrected the php.ini from OFF to ON.我有一个问题, PHP文件,显示“的PHP解析错误:语法错误,意想不到的元月底”的错误,我按照指示在此页和纠正在php.ini从小康到对。
Now, the file don’t give any feedback when I open it.现在,该文件不给任何意见,当我打开它。 It only gives me a blank page and no info!它只是给我一个空白页和没有信息! O_o o_o
It’s strange… Can you help me please?它的奇怪…你能帮助我好吗? Thanks.谢谢。
March 29th, 2007 22:29 2007年3月29日22时29分
This might be due to a missing quote also这可能是由于一名失踪报价也
August 30th, 2007 19:39 2007年8月30日19时39分
Thanks a ton, I’ve been trying to figure this out for the last few hours.感谢1吨,我一直在尝试的数字,这在过去几个小时。
September 15th, 2007 20:20 2007年9月15日20时20分
thhanx a lot short_open_tag = On solved my problem. thhanx了很多short_open_tag =对解决我的问题。 ypu are helpful ypu帮助
September 30th, 2007 12:07 2007年9月30日12时07分
wow!哇! thanks for your useful guidance…感谢您了有益的指导…
October 23rd, 2007 18:52 2007年10月23日18时52分
Very useful, thanks.非常有用,感谢。 I just upgraded to openSuse 10.3 from 10.2 which had reset my php.ini.我升级到了openSUSE的10.3 ,从2月10日已重设我的php.ini的影响。
February 27th, 2008 20:22 2008年2月27日20时22分
Thanks for your time, But for me Its really didfficult to find a missing curly bracket.感谢您的时间,但对我来说,其真正didfficult找到一名失踪曲括弧内。
Is there any easiest way to findout with MISSING CURLY BRACKET.有什么简单的方法findout与失踪曲括弧内。 Any editor can do it for us.任何编辑器可以做的,它为我们。
Please Help.请帮帮忙。
Rana蛙
March 8th, 2008 14:27 2008年3月8日14时27分
syntax error, unexpected $end in C:\wamp\www\login.php on line 49语法错误,意想不到的元月底在C : \ wamp \ WWW的\ login.php上线49
March 17th, 2008 00:32 2008年3月17日0时32分
Thank you,谢谢您,
Been searching for ages for solution to this.一直在寻找年龄为解决这个。
short_open_tag = On solved that problem for me. short_open_tag =就解决了这个问题对我来说。
Finally I can open templates最后,我可以打开模板
May 10th, 2008 14:10 2008年5月10日14时10分
Thank you very much …..非常感谢你… ..