File path in webserver

Hello guys!

I’m having trouble with filepaths in my webserver. In my root folder I have serveral other folders like admin, core, includes ect.

The admin folder contains php files of course, such as login.php, index.php ect. The core folder only contains the init.php which is establish a connection connection with the mysql server.

Well somehow I can’t reach the init.php from the php files in the admin folder.

I tried: require_once '../core/init.php'; and require_once(__DIR__ .'/../core/init.php');

I tried to debug the admin/index.php and here is what I got:

path:string(49) "/home/proteinc/public_html/admin/../core/init.php" realpath:string(40) "/home/proteinc/public_html/core/init.php" is_file:bool(true)

Try looking in the PHP log file to see the errors or temporarily set error_reporting(-1); and ini_set("display_errors", "1");

Try also to echo getcwd(); and then require the full path to “init.php”


// PHP log file name:
   echo  ini_get( 'error_log' ) ;

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.