php - 如何通过localhost打开php文件?
问题描述
我是一名高中生,想学习如何编码。我正在使用 xampp、php、mySQL 和 Apache 开发一个学生管理程序。当我使用 localhost: localhost/superschool/index.html打开我的 index.html 文件时,站点地址变为localhost/superschool/index.php。这会显示以下错误消息: HTTP ERROR 500 with console message: (index):7290 crbug/1173575, non-JS module files deprecated。 我不确定为什么会这样。你能给我一个见解来解决这个问题吗?太感谢了!这是我的 index.html 和 index.php 文件供参考。
索引.html
<html>
<head>
<meta http-equiv="Refresh" content="0;url=index.php">
<title>Loading ...</title>
</head>
<body></body>
</html>
索引.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");
}
解决方案
推荐阅读
- javascript - 如何让函数在执行之前等待其他函数完成
- r - 当间隔穿过午夜时按日期对持续时间进行分组
- excel - 有条件地重构重复的 csv 索引
- kdb - KDB - 文本解析和分类文本数据
- r - 用 1 替换值,用 0 替换空单元格以生成热图?
- cucumber - 黄瓜支持被禁用,因为缺少“黄瓜导轨”宝石或黄瓜导轨插件
- c# - PictureBox 不释放资源
- javascript - JavaScript:如何优化基于贪心算法运行的团队平衡程序?
- macos - 在 OSX 10.12 上升级 ffmpeg(或 rust)找不到 make
- firebase - 当用户通过从概览窗口滑动关闭应用程序时,Firebase 会处理未完成的下载