目录结构:
主目录结构
home.php thankyou.php
Php目录结构
root directory/php/date.php
包括目录结构
root directory/include/header.php root directory/include/footer.php
图像目录结构
root directory/images/logo.png
root directory/images/abc.jpg对于date.php,我想使用头文件和footer.php文件。但是图像没有显示出来。我写了下面的代码
<?php require_once '../include/header.php';?>但是当我用在家里和thankyou.php的时候,它工作得很好。
在头文件中,图像的代码
<a href="index.php"><img src="images/logo.png" alt="Logo" class="image"></a>我不想改变date.php的目录。和not interested to absolute path的图像。
怎样做才能在两个目录()中看到图像
发布于 2014-11-20 08:22:13
我使用了基html标记,就像双列在head部分告诉我的那样。
<head>
<base href="root directory/images/" target="_blank">
</head>https://stackoverflow.com/questions/25844176
复制相似问题