How to open php files through localhost

0 votes

I am creating a student management program with xampp, PHP, MySQL, and Apache. But the problem is that when I opened my index.html file with localhost: localhost/superschool/index.html, the site address changed into localhost/superschool/index.php. This shows up this error message: HTTP ERROR 500 with console message: (index):7290 crbug/1173575, non-JS module files deprecated. 

index.html

<html>
    <head>
        <meta http-equiv="Refresh" content="0;url=index.php">
        <title>Loading ...</title>
    </head>
    <body></body>
</html>

index.php

    error_reporting(E_ERROR | E_WARNING | E_PARSE);
    $currDir = dirname(__FILE__);
    include("{$currDir}/defaultLang.php");
    include("{$currDir}/language.php");
    include("{$currDir}/lib.php");

    $x = new DataList;
    $x->TableTitle = $Translation['homepage'];
    $tablesPerRow = 2;
    $arrTables = getTableList();

    // according to provided GET parameters, either log out, show login form (possibly with a failed login message), or show homepage
    if(isset($_GET['signOut'])){
        logOutUser();
        redirect("index.php?signIn=1");
    }elseif(isset($_GET['loginFailed']) || isset($_GET['signIn'])){
        if(!headers_sent() && isset($_GET['loginFailed'])) header('HTTP/1.0 403 Forbidden');
        include("{$currDir}/login.php");
    }else{
        include("{$currDir}/main.php");
    }

Can someone help me with this issue?

Jun 10 in PHP by narikkadan
• 10,840 points
5 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

How to delete all files from a folder using PHP?

Hello @kartik, Use this: $files = glob('path/to/temp/*'); // get ...READ MORE

answered Sep 14, 2020 in PHP by Niroj
• 82,720 points
247 views
0 votes
1 answer

How do I add PHP code/file to HTML(.html) files?

Hello @kartik, You can't run PHP in .html ...READ MORE

answered Oct 22, 2020 in PHP by Niroj
• 82,720 points
218 views
0 votes
1 answer

In PHP, how to detect the execution is from CLI mode or through browser ?

Hello @kartik, Use the php_sapi_name() function. if (php_sapi_name() == "cli") { ...READ MORE

answered Oct 22, 2020 in PHP by Niroj
• 82,720 points
252 views
0 votes
1 answer

How to upload and Save Files with Desired name using php?

Hello, You can try this, $info = pathinfo($_FILES['userFile']['name']); $ext = ...READ MORE

answered Nov 4, 2020 in PHP by anonymous
• 82,720 points
541 views
0 votes
1 answer

How to get the list of specific files in a directory using php?

Hello @kartik, You'll be wanting to use glob() Example: $files = ...READ MORE

answered Nov 6, 2020 in PHP by Niroj
• 82,720 points
226 views
0 votes
1 answer

How to read a list of files from a folder using PHP?

Try this: $files = array_values(array_filter(scandir($path), function($file) use ($path) ...READ MORE

answered Nov 18, 2020 in PHP by Niroj
• 82,720 points
113 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
4,469 views
0 votes
1 answer
0 votes
1 answer

How to access PHP var from external javascript file?

Hello @kartik, You don't really access it, you ...READ MORE

answered Jul 6, 2020 in Java-Script by Niroj
• 82,720 points
4,330 views
0 votes
1 answer

How do I escape a single quote in SQL Server?

Hello @kartik, Single quotes are escaped by doubling ...READ MORE

answered Jul 21, 2020 in PHP by Niroj
• 82,720 points
4,246 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP