<?php $url = “http://www.sina.com.cn/abc/de/fg.php?id=1″; arr=parseurl(url); pathArr=pathinfo(arr[‘path’]); print_r($pathArr[‘extension’]);打赏感谢支持与鼓励~