您的位置:首页 > 编程语言 > PHP开发

PHPcms php.ini中的short_open_tag

2010-05-22 20:22 393 查看


新搭建了个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;?>才行。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: