PHPcms php.ini中的short_open_tag


新搭建了个PHP+MySQL环境,以前用的好好的网站,在新环境下就是会报错,晕了。
如报以下错误:
You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax touse near '' at line 1

还有的是报

Parse error: syntax error, unexpected $end inD:webmjjbfclassfunctions.php on line 1246

查看原代码,没发现什么问题,通过多方了解才找中到答案,还是系统环境没有搭建好,在php.ini中有个short_open_tag,默认为“short_open_tag= Off”改为“short_open_tag =On”就行了,即让PHP支持简短标签写法,如在设置为Off时,在写程序时用<?=$xxx;?>会报错,要写成<?phpecho $xxx;?>才行。

posted on 2010-05-22 20:22  xieguang133  阅读(176)  评论(0)    收藏  举报

导航