<? include "../../a.php;"?>这样。。a.php里的图片也要相对于这样../../如果很多页面都需要用到a.php的话,
//a.php
<img src=$imgPath/test.gif>//b.php
$imgPath = '../../';
include_once("../../a.php");
//a.php
<img src=$imgPath/test.gif>//b.php
$imgPath = '../../';
include_once("../../a.php");
------a.php-----
<?
if(!defined('PATH'))
define('PATH', './');
echo "<img src='.PATH.'aa.gif>";
?>
------------b.php---------------
<?
define('PATH', '../../');
include PATH.'a.php';
?>
后来就成了http://web/b/ttt.php了
ini_set("include_path",".;".realpath("."));b/c/d.php包含写作
include "a.php";