I am trying to access my root directory “include” files, however, when I attempt to, they are not accessible.
I am getting an error as if they did not exist.
For example:
I am trying to access dbconnect.php, which is located in my root directory.
The domain is [url]www.mydomain.com
I made an admin folder and I need to access dbconnect.php, however, I DO NOT want to put the full URL in the event that I need to transfer scripts to other sites.
The work directory I am currently in is [url]www.mydomain.com/admin/includes
I need to access dbconnect.php, located in [url]www.mydomain.com/
I have tried the following and failed:
[code=php]<?
$root_path = ‘./’;
include($root_path . ‘dbconnect.php’);
?>
[code=php]<?php include(‘./dbconnect.php’);?>
Anyone know how to do this without me having to type
[code=php] <?php include(‘http://www.mydomain.com/dbconnect.php’);?>