Hi,
I have these files
/include/db_info.inc
/html_root/util_fns.inc
/html_root/home_page.php
/html_root/admin/admin_home.php
The page "util_fns.i nc" contains the line
<?php include("../db_info.inc"); ?>
The page home_page.php contains
<?php include("util_f ns.php"); ?>
and admin_home.php contains
<?php include("../util_fns.php"); ?>
but when I visit admin_home, I get the error
"main(../include/db_info.inc): failed to open stream: No such file or
directory". If I change the line in "util_fns.i nc" to:
<?php include("../../db_info.inc"); ?>
the admin_home.php works fine, but the home_page.php page breaks. How
can I write the include line in "util_fns.i nc" to accommodate both
situations?
Thanks, - Dave
I have these files
/include/db_info.inc
/html_root/util_fns.inc
/html_root/home_page.php
/html_root/admin/admin_home.php
The page "util_fns.i nc" contains the line
<?php include("../db_info.inc"); ?>
The page home_page.php contains
<?php include("util_f ns.php"); ?>
and admin_home.php contains
<?php include("../util_fns.php"); ?>
but when I visit admin_home, I get the error
"main(../include/db_info.inc): failed to open stream: No such file or
directory". If I change the line in "util_fns.i nc" to:
<?php include("../../db_info.inc"); ?>
the admin_home.php works fine, but the home_page.php page breaks. How
can I write the include line in "util_fns.i nc" to accommodate both
situations?
Thanks, - Dave
Comment