记:解决Namespace declaration statement has to be the very first statement in the script 错误

来源:互联网 发布:淘宝详情页编辑器 编辑:程序博客网 时间:2024/06/01 15:58

TP5 运行出现 Namespace declaration statement has to be the very first statement in the script 错误

解决方法:

问题就出在文件格式上,因为偷懒解决冲突直接用记事本打开文件保存提交后发现出了以上的问题,最后把页面转为utp-8无dom格式 


顺利解决问题(如有使用PhpStorm的可以如图操作把文件修改为无BOM格式)

阅读全文
0 0