Home > php教程 > php手册 > 取得当前路径与文件名--己解决

取得当前路径与文件名--己解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-21 09:12:31
Original
1611 people have browsed it

解决|文件名

如我想取当前文件路径 http://localhost/page.php?page=2 ,
现在我知道 echo "http://".$HTTP_SERVER_VARS['HTTP_HOST'].$HTTP_SERVER_VARS['REQUEST_URI'];
可以取得,可是如果我想取得 http://localhost/page.php 怎么办?
echo "http://".$HTTP_SERVER_VARS['HTTP_HOST']. $_SERVER['PHP_SELF'];



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template