我有一个维护页面503.php。我试着把图像显示出来,但没有显示出来。我尝试过path和html方式,但是它没有工作。下面是代码,也有人帮助我解释如何将图像包含在php文件中?
我的网站图片目录是这样的:
服务器上:pulic_html/网站/图片
本地网站/图片
php文件dir: file /503.php
<!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" />
<title>
<?php
header("HTTP/1.1 503 Service Temporarily Unavailable");
header("Status: 503 Service Temporarily Unavailable");
header("Retry-After: 3600");
?>
</title>
<style type="text/css">
body {
background-image: url("../images/black-brick-wall-texture.jpg");
}
</style>
</head>
<body>
<div>
<div>
<p style="text-alignment: middle"><img src="../images/still-under-construction.gif" width="306" height="350" alt="dang duoc bao tri" />" </p>
</div>
<div style="text-align: center; font-size: 24px; color: #FFF;">
<p>BSeveryday.vn hiện <span style="color: #F00">under maintenance</span>, please come back later <span style="color: #F00">30p - 2 giở</span>.</p>
<p>if you have any problem, please send me a message at: <span style="color: #00F">vandekhac@bseveryday.vn</span></p>
</div>
</div>
<p><img src="../images/under_construction.gif" alt="under maintenance" width="350" height="299" align="right" />" </p>
</body>
</html>发布于 2015-04-30 05:59:42
在网站根目录中的.htaccess文件中,在RewriteRule行之前插入以下行:
RewriteCond %{REQUEST_FILENAME} !.(gif|jpe?g|png)$您可能需要将css或js添加到文件类型列表中,这取决于您持有页面的需要。
它可以解决你的问题。
https://stackoverflow.com/questions/29959405
复制相似问题