the last time i ask a question here i ended up solving it myself.. But not his time, been searching hours again till i can't think anymore.. Maybe i can pick your brain.
Here is my problem.
I have an include folder in root directory, inside i have a DB_info.php file which holds $hostname, $user, $password, $DBname. In the same include, there is a folder name subfolder which holds a Dbconnect.php,inside it has a require "../DB_info.php"; and the try{$pdo= new} which conects to the database. With the connected succefully visible on the DBconnect page.
When trying to add a require on the root directory index.php, require "include/subfolder/DBconnect.php";, i get the error saying the the required field require(../DB_Info.php)"Failed to open stream: No such file or directory"
any thoughts?
i keep trying going back on folders, ../include/subfolder/Dbconnect.php, ../../subfolder/Dbconnect.php.
-------EDITED------
With Xander suggestion bellow it lead me to creating a header.php page. Inside i have:
$site['url'] = "http://subscribe.com";
$site['base'] = "{$site['url']}templates/base/"; $site['inclu'] = "{$site['url']}inclu/"; $site['classes'] = "{$site['inclu']}classes/";
define("CreProSion_URL_ROOT", $site['url']);define("CreProSion_URL_INCLU", $site['inclu']); define("CreProSion_INCLU_CLASS", $site['classes']);
but the above code gives me a 404 error if i view the header.php file, also the DBconnect gives me this error:
PHP Warning: require_once(http://subscribe.com/inclu/classes/DBconnect.php): Failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error