日期:2014-05-17 浏览次数:20745 次
<?php $paths=array("http://we.us","x.y.z","a.b.cn/en/","http://a.b.cn/en/js","a.b.cn/js/","a.b.cn/en/js/ext","a.b.cn/en/css/ext/"); $files=array("http://so.do.i","http://a.b.cn/","./","../","../../","../js/","/js","/css/blue.css","../../en/js/ad.js"); foreach($paths as $path){ foreach($files as $file){ echo realfile($path,$file); } } function realfile($path,$file){ //返回文件file的绝对地址, //如果文件地址是相对地址,则以路径path为参照 /* $real=$path.$file;//要完善的内容 */ return '<li>'.$real.'</li>'; } ?>