<?php
echo "php獲取當前url<br/>";
$url = "http://".$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF'];
echo $url;
?>
<br/>以下代碼是:php獲取網站根目錄<br/>
<?php
$PHP_SELF=$_SERVER['PHP_SELF'];
$url='http://'.$_SERVER['HTTP_HOST'].substr($PHP_SELF,0,strrpos($PHP_SELF,'/')+1);
echo $url;
?>
-->
<br/>php獲取訪客信息<br/>
<?php
print_r($_SERVER['CERT_SERIALNUMBER']);
print_r($_SERVER);
?>