No such file or directory after importing PHP to cpanel / File server

378 Views Asked by At

AFter uploading my php and directories, i try to launch my webpage from the browser , but get the following error

No such file or directory

Even though the directorys are still correct and the CWD is as it should be. and the website runs with same code on localhost

I dont understand why there is a problem.

Do i have to explicitly set the directory in my code now its on a server??

I am using the InfinityFree hosting and filezilla FTP

Uploaded sucsessfully and filesystem in tact. I dont get it.

Code might show you people something im not seeing.

thanks for any advice.

CWD is as follows (in server)

/home/vol7_1/epizy.com/epiz_28339183/htdocs/vbay

On drive it was xammp/htdocs/vbay

LOCALHOST/VBAY


Directory system is
htdocs{
   Vbay{
        DBmanagment
        InnerElements
        ExtraImages
        Pages
        }
}

CODE:

$DBConnect='DBmanagment/DBConnect.php';// Database Connection DIR
            
        
if (file_exists($DBConnect)){
                                
    if (is_readable($DBConnect)) {
        require ($DBConnect); // INCLUDE THE DATABASE 
        }
        else {
              throw new Throwable();
              }                                     
}
else{
      throw new Throwable();
    }
0

There are 0 best solutions below