Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
图片显示php文件中的目录_Php_Maintenance - Fatal编程技术网

图片显示php文件中的目录

图片显示php文件中的目录,php,maintenance,Php,Maintenance,我有一个维护页面503.php。我试图让图像显示,但它没有显示。我尝试了path和HTMLIMG方式,但没有成功。下面是代码,还有谁能帮我解释如何在php文件中包含图像? 多谢各位 我的网站图片目录如下: 服务器上:pulic_html/网站/图像 本地:网站/图片 php文件目录:website/503.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/

我有一个维护页面503.php。我试图让图像显示,但它没有显示。我尝试了path和HTMLIMG方式,但没有成功。下面是代码,还有谁能帮我解释如何在php文件中包含图像? 多谢各位

我的网站图片目录如下:

服务器上:pulic_html/网站/图像

本地:网站/图片

php文件目录:website/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>

在网站根目录的.htaccess文件中,在重写规则行之前插入以下行:

RewriteCond %{REQUEST_FILENAME} !.(gif|jpe?g|png)$
您可能需要将css或js添加到该文件类型列表中,具体取决于挂起页的需要


它可能会解决您的问题。

尝试不使用此../。urlmages/black-brick-wall-texture.jpg;我做了,但它在服务器上不起作用,文件类型为php。当问题解决后,不要更改标题,勾选解决问题的答案旁边的复选标记。另请参见:我如何做到这一点?或者只是在标题中添加解决方案?