我已经设置了一个cron作业来运行php脚本,
/usr/bin/curl http://www.domain.com/folder/script.php
我通过电子邮件找不到404页面,
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
104 1982 104 1982 0 0 235k 0 --:--:-- --:--:-- --:--:-- 483k
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>404 Not Found</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
background-color:#367E8E;
scrollbar-base-color: #005B70;
scrollbar-arrow-color: #F3960B;
scrollbar-DarkShadow-Color: #000000;
color: #FFFFFF;
margin:0;
}
a { color:#021f25; text-decoration:none}
h1 {
font-size: 18px;
color: #FB9802;
padding-bottom: 10px;
background-image: url(sys_cpanel/images/bottombody.jpg);
background-repeat: repeat-x;
padding:5px 0 10px 15px;
margin:0;
}
#body-content p {
padding-left: 25px;
padding-right: 25px;
line-height: 18px;
padding-top: 5px;
padding-bottom: 5px;
}
h2 {
font-size: 14px;
font-weight: bold;
color: #FF9900;
padding-left: 15px;
}
</style>
</head>
<body>
<div id="body-content">
<!-- start content-->
<!--
instead of REQUEST_URI, we could show absolute URL via:
http://HTTP_HOST/REQUEST_URI
but what if its https:// or other protocol?
SERVER_PORT_SECURE doesn't seem to be used
SERVER_PORT logic would break if they use alternate ports
-->
<h1>404 Not Found</h1>
<p>The server can not find the requested page:</p>
<blockquote>
/folder/script.php (port 80)
</blockquote>
<p>
Please forward this error screen to www.domain.com's]
<a href="mailto:info@on.sg?subject=Error message [] 404 Not Found for /folder/script.php port 80 on Wednesday, 29-Oct-2014 17:34:01 SGT">
WebMaster</a>.
</p>
<hr />
<!-- end content -->
</div>
</body>
</html>
我在几个站点使用相同的Cron作业命令,它们都在工作。 请帮我解决这个问题。
感谢。
答案 0 :(得分:0)
尝试通过浏览器访问http://www.domain.com/folder/script.php并查看结果。
确保它没有显示404。
答案 1 :(得分:0)
我按照以下方式设置了cron作业,它正在运行。
/usr/local/bin/php -q /home/btlopsco/public_html/