php - PHP 代码在本地工作,但无法正确运行 Web 服务器
问题描述
我有一个来自在本地服务器上运行的客户端的代码。索引页面显示背景和表格,但在在线服务器上它只显示背景图像,没有其他内容
这是 index.php 脚本:
<?php include('header.php'); ?>
<body id="login">
<div class="container">
<form id="login_form" class="form-signin" method="post">
<h3 class="form-signin-heading"><i class="icon-lock"></i> Please Login</h3>
<input type="text" class="input-block-level" id="usernmae" name="username" placeholder="Username" required>
<input type="password" class="input-block-level" id="password" name="password" placeholder="Password" required>
<button name="login" class="btn btn-info" type="submit"><i class="icon-signin icon-"></i> Sign in</button>
</form>
<script>
jQuery(document).ready(function(){
jQuery("#login_form").submit(function(e){
e.preventDefault();
var formData = jQuery(this).serialize();
$.ajax({
type: "POST",
url: "login.php",
data: formData,
success: function(html){
if(html=='true')
{
$.jGrowl("Welcome to Thutoboswa Learning Management System", { header: 'Access Granted 😀 #WearAMask😷' });
var delay = 2500;
setTimeout(function(){ window.location = 'dashboard.php' }, delay);
}
else
{
$.jGrowl("Please Check your username and Password", { header: 'Login Failed' });
}
}
});
return false;
});
});
</script>
</div>
<!-- /container -->
<?php include('script.php'); ?>
</body>
</html>
Mozilla Firefox 控制台显示以下警告:
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. gobojangojss.co.bw
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# insteadjquery-1.9.1.min.js:2:21
Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. modernizr-2.6.2-respond-1.1.0.min.js:4:3946
downloadable font: bad search range (font-family: "TR Century Gothic" style:normal weight:400 stretch:100 src index:0) source: https://gobojangojss.co.bw/admin/bootstrap/css/TR%20Century%20Gothic.ttf
downloadable font: bad range shift (font-family: "TR Century Gothic" style:normal weight:400 stretch:100 src index:0) source: https://gobojangojss.co.bw/admin/bootstrap/css/TR%20Century%20Gothic.ttf
downloadable font: cmap: bad id_range_offset (font-family: "TR Century Gothic" style:normal weight:400 stretch:100 src index:0) source: https://gobojangojss.co.bw/admin/bootstrap/css/TR%20Century%20Gothic.ttf
Source map error: Error: request failed with status 404
Resource URL: https://gobojangojss.co.bw/admin/vendors/jquery-1.9.1.min.js
Source Map URL: jquery.min.map
解决方案
推荐阅读
- javascript - 替换html中的所有单词而不影响标签
- c - 无法从 C 中的 .ELF 文件中读取一个段
- python - 计算 Pandas 中每天重置的累积盘中指标
- events - 钻取 rdlc 报告未加载
- c++ - 卡在 C++ 中的文件搜索中:
- powershell - 获取内容中的Powershell多重匹配
- bit-manipulation - 快速查找 64 位无符号空半字节
- reactjs - Redux get store.getState() 未定义
- python - 如何在python中获取包含正在搜索的字符串(在列表内)的列表中的项目索引
- c++ - 创建没有指定大小的对象数组