<br> //获取当前的域名: <br> echo SERVER['SERVER_NAME'];//获取来源网址,即点击来到本页的上页网址 <br> echo SERVER["HTTP_REFERER"]; <br> SERVER['REQUEST_URI'];//获取当前域名的后缀 <br> SERVER['HTTP_HOST'];//获取当前域名 <br> dirname(__FILE__);//获取当前文件的物理路径 <br> dirname(__FILE__)."/../";//获取当前文件的上一级物理路径 <br> ?> <br> <br> 摘自 Hurry的专栏 <p align="left"></p><div style="display:none;"> <span id="url" itemprop="url">http://www.bkjia.com/PHPjc/478447.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http://www.bkjia.com/PHPjc/478447.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">/prepre class=php name=code? //获取当前的域名: echo SERVER[SERVER_NAME];//获取来源网址,即点击来到本页的上页网址 echo SERVER[HTTP_REFERER]; SERVER[REQUEST_UR...</span> </div> <div class="art_confoot"></div>