Thread
:
php定位网站指定文件的方法
View Single Post
#
1
IP: 218.2.28.210
2006-05-19, 02:12 PM
sunshine
高级会员
Join Date: 2006-01-05
Posts: 368
php定位网站指定文件的方法
比如说文件名是ad.php,在网站的根目录下。定位代码如下:
Quote:
<?php
include ("http://".$_SERVER ['HTTP_HOST'].'/ad.php');
?>
如想显示指定的文件名,代码如下:
Quote:
<?php
include ("http://".$_SERVER ['HTTP_HOST'].'/ad.php');
echo $url;
?>
Last edited by sunshine : 2006-05-19 at
02:21 PM
sunshine
View Public Profile
Send a private message to sunshine
Find all posts by sunshine