各位老大,为配合监管要求,我在自己的网站上重新写了一个主页,将原主页跳转为二级页面,但运行一段时间后(估计就一天两天或更短的时间),当从主页面点击进入二级页面时,就显示File not found。
无奈,我只能将打包的代码重新解压一遍后,就可以正常运行,如此反复,不知道是那里设置错误,请各位指教!
以下这个是入口index.php
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// 应用入口文件
// 检测PHP环境
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Methods:*');
header('Access-Control-Allow-Headers:*');
header('Access-Control-Allow-Credentials:false');
header('Content-type:text/html;charset=utf-8');
if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',true);
// 定义应用目录
define('APP_PATH','./Admin/');
// 定义插件目录
define('PLUGIN_PATH','plugins/');
// 引入ThinkPHP入口文件
define('SITE_URL','http://'.$_SERVER['HTTP_HOST']);
// 网站域名
require './ThinkPHP/ThinkPHP.php';
// 亲^_^ 后面不需要任何代码了 就是如此简单
收下是我自己修改后的新主页index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width"/>
<meta name="viewport" content="initial-scale=1.0,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link type="text/css" href="/Public/home/css/css.css" rel="stylesheet" />
<link rel="stylesheet" href="/Public/home/css/common.css" />
<link href="/Public/home/css/style2.css" rel="stylesheet" type="text/css">
<link type="text/css" href="/Public/home/css/gaode.css" rel="stylesheet" />
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=4ec8a8764b99ab85106c500468f62747&plugin=AMap.CitySearch"></script>
<script type="text/javascript" src="/Public/home/js/mySystem.js"></script>
<script type="text/javascript" src="/Public/home/js/jquery.SuperSlide.js"></script>
<style>
.d{
display: inline-block;background-color:#FE6500;color:#ffffff;width:20px;height: 20px;line-height:20px; text-align:center;margin:0 3px;
border-radius:3px;
}
.m{
display: inline-block;background-color:#FE6500;color:#ffffff;width:20px;height: 20px;line-height:20px;text-align:center;margin:0 3px;
border-radius:3px;
}
.h{
display: inline-block;background-color:#FE6500;color:#ffffff;width:20px;height: 20px;line-height:20px;text-align:center;margin:0 3px;
border-radius:3px;
}
.s{
display: inline-block;background-color:#FE6500;color:#ffffff;width:20px;height: 20px;line-height:20px;text-align:center;margin:0 3px;
border-radius:3px;
}
</style>
<style>
@media screen and (max-width: 600px) { /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
.mBan2{
width:100%;height: 200px;
}
.mBan2 .slideBox .bd img{ width:100%; height:200px; display:block; }
}
@media screen and (min-width: 1200px) { /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
.mBan2{
width:100%;height: 750px;
}
.mBan2 .slideBox .bd img{ width:100%; height:750px; display:block; }
}
}
</style>
<title>***********</title>
</head>
<body>
<div class="container" style="position: relative;">
<div style="font-size:14px;width:600px;margin:0 auto; padding:20px 0;">
<center><font color="#FF0000">欢迎来到我的*****</font></center>
<center><font color="#FF0000">*****</font></center>
<center><font color="#FF0000">*******</font></center>
<center><font color="#FF0000">*******</font></center>
</div>
<div style="font-size:48px; width:600px;height: 100px;margin:0 auto; padding:20px 0;" >
<a href="/index.php/Home/Index/fxzx" ><font color="#0000FF">点我进入下级页面</font></a>
</div>
<div style="font-size:14px;width:300px;margin:0 auto; padding:20px 0;">
<a href="https://beian.miit.gov.cn" target="_blank">*********</a>
</div>
<div style="font-size:14px;width:300px;margin:0 auto; padding:20px 0;">
<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=******" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
<img src="/Public/home/img/gongan.png" style="float:left;"/>
<p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">***********</p>
</a>
</div>
</div>
</body>
</html>
原主面变为fxzx.html与index.html在同一目录
在腾讯云使用宝塔上apache部署