This is driving me crazy! Here is my code:
This file is called index.php which is in a directory called admin.
Here is the code for another file called blog.php which is the same directory as admin.
$conn = Blog\DB\connect($config);
if (!$conn) die('Could not connect');
Now, when I navigate to admin/index.php I get an error:
Fatal error: Call to undefined function Blog\DB\connect() in C:\xampp\htdocs\sandbox\blog\blog.php on line 6.
I tried putting namespace Blog\DB and deleting Blog\ from the blog.php file but I keep getting that error.
I don't know what the problem is, other pages that use blog.php are working fine.