您的位置:首页 > 其它

Namespace declaration statement has to be the very first statement or after any declare call in the script

2017-09-28 15:19 645 查看

0x00缘起

代码部署在windows上,出现了一个bug,临时用记事本打开修改了一下,于是出现了500错误

0x01排错

查看log,提示如下

“Namespace declaration statement has to be the very first statement or after any declare call in the script xxx.controller”。于是看这个php文件,什么也没发现。

一头雾水,只好在网上找了一下,没想到是万恶的bom引起的。

0x03解决办法

重新保存为utf-8无bom格式。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐