Hi,
This is driving me crazy! Here is my code:
[code=php]<?php
require ‘../blog.php’;
view(‘admin/create’);
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.
[code=php]<?php
require ‘functions.php’;
require ‘db.php’;
$conn = BlogDBconnect($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 BlogDBconnect() in C:xampphtdocssandboxblogblog.php on line 6.
I tried putting namespace BlogDB 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.
Thanks