莫名其妙的Parse error: syntax error, unexpected $end

来源:互联网 发布:java 游戏服务器 编辑:程序博客网 时间:2024/06/04 17:46

莫名其妙的Parse error: syntax error, unexpected $end 

 

之前的项目都没有问题,重装系统后发现:Parse error: syntax error, unexpected $end.找了半天,竟然忘了GOOGLE一下..原来是这样哦,记录一下.

在PHP文件中如果使用了<?来替代<?php标记PHP代码的开始,并且php.ini中的short_open_tag应该为On
short_open_tag = On

否则就会报异常:Parse error: syntax error, unexpected $end

原创粉丝点击