Search code examples
phplinuxphpmyadminxampplampp

how to access multiple php files in different sub-folders under LAMPP in LINUX


Hi I am new to LINUX and recently installed LINUXFX which was working great. Now I have LAMPP (XAMPP) Configuration issue with it. After installing XAMPP I was able to load XAMPP demo page successfully, but if I want to open my project folders which are located in different sub-directories, I can't.

In detail, I have copied my project folders to /LAMPP/HTDOCS/ and in .CONF File I could be able to change the root path to access only one project folder. How can I make it for multiple projects. Please Help!

if($row){
   if($row['role']==0 || $row['role']=='0'){
    $_SESSION['login']=$Cashier;
    echo'<script>location.href="admin_dashboard.php";</script>'; 
    }elseif($row['role']==1 || $row['role']=='1'){
        $_SESSION['login']=$Cashier;
    echo'<script>location.href="cashier_dashboard.php";</script>';
  }else{
    echo'<script>alert("!This username  "); 
location.href="index.php";</script>';
    }
}else{
echo'<script>alert("!This username and password do not match "); 
location.href="index.php";</script>';
  }

}
$conn->close();

Solution

  • I have solved the problem as mentioned below. First as suggested by @Cbroe, I set the path in the Apache Config file. The issue is with the file name. The file name was given as "cashier_dashboard.php" in the code and the original file name was "Cashier_Dashboard.php". As earlier while doing the same in windows 10, it was accepting the code without any problem. I presume in LINUX, we must be very careful in assigning the file name and this should be same in the PHP code as well!

    Thank you @cbroe for guiding me!