今天测试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 开始前面不能有空行或者其他语句
解决办法:
把<?php移动到最顶部去,成功解决
到此为止。
发布者:彬彬笔记,转载请注明出处:https://www.binbinbiji.com/php/2849.html