zoukankan      html  css  js  c++  java
  • Namespace declaration statement has to be the very first statement or after any declare call in the script

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

  • 相关阅读:
    python-04
    python-03
    python-02
    python-01
    day4-RHCS
    python 之元组(tuple)
    11.21
    python之猜数小游戏
    python之简陋的数据库
    11.20
  • 原文地址:https://www.cnblogs.com/xdao/p/php_bom.html
Copyright © 2011-2022 走看看