My directory structure looks like this:
blog -> admin -> index.php
blog.php
db.php
functions.php
I have been trying to include
(require
, really) blog.php
in the admin/index.php
, but facing lots of errors. I'm following a PHP course, and the instructor does the same thing successfully.
admin/index.php:
require "../blog.php";
which, in turn, requires two more files in its directory.
require "db.php";
require "functions.php";
../../blog.php
assuming thatblog.php
is not in theblog
folder. – prodigitalsonblog.php
is in theblog
directory. – Rafay