1
I wonder what caused this problem that I solved "kind of without knowing how".
I created the file mysql.php
using Pspad editor to debug some queryes and mysteriously started to look like the bug:
Fatal error: Namespace declaration statement has to be the very first statement in the script in C:\localhost\teste\libraries\teste\mysql.php on line 2
Since in the code there is nothing that denotes such an error:
<?php
namespace MysqlTESTE; //utilização de namespaces (CRUD)
include 'server.php';
use Mysqli;
...
I solved the problem by creating a new file mysql.php
on Notepad and pasting on it the code copied from the file created on Pspad
Really I only managed to solve this problem by changing editor .. in the case I used the "Notepad" of Windos. But at the time I didn’t understand what caused this problem.
– lorduakiti