运行php程序出现Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in xxxxxxxx on line 6的解决办法

今天测试php程序的时候,刚开始一切都正常的,可是突然出现下面的错误

Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in xxxxxxxxx on line 6

其中xxxxxxxxx代表文件路径

运行php程序出现Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in xxxxxxxx on line 6的解决办法

发现问题:

<?php  开始前面不能有空行或者其他语句

解决办法:

<?php移动到最顶部去,成功解决

到此为止。

发布者:彬彬笔记,转载请注明出处:https://www.binbinbiji.com/php/2849.html

(0)
彬彬笔记彬彬笔记
上一篇 2022年9月24日
下一篇 2022年10月7日

相关推荐

发表回复

登录后才能评论
蜀ICP备14017386号-13