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格式。

相关文章:

  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
猜你喜欢
  • 2021-12-30
  • 2022-02-13
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案