<? /* 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