<? /* by www.manongjc.com/article/1119.html */ $test = pathinfo("http://localhost/index.php"); print_r($test); ?>
Array ( [dirname] => http://localhost //url的路径 [basename] => index.php //完整文件名 [extension] => php //文件名后缀 [filename] => index //文件名 )
<? /* by http://www.manongjc.com (码农教程)*/ $test = parse_url("http://localhost/index.php?name=tank&sex=1#top"); print_r($test); ?>
Array ( [scheme] => http //使用什么协议 [host] => localhost //主机名 [path] => /index.php //路径 [query] => name=tank&sex=1 // 所传的参数 [fragment] => top //后面根的锚点 )
<? $test = basename("http://localhost/index.php?name=tank&sex=1#top"); echo $test; ?>
index.php?name=tank&sex=1#topphp
原文地址:http://www.manongjc.com/article/1119.html
html
其余阅读:mysql