How to Solve PHP Fatal error: Namespace declaration statement has to be the very first statement

Questions

When accessing PHP API interface, always prompt:

Namespace declaration statement has to be the very first statement in the script

reason

The file is UTF-8 with DOM format

terms of settlement

In submit, modify the file to UTF-8 without DOM format


Read More: