php如何判断文件是否存在,包括本地和远程文件
//php如何判断文件是否存在,包括本地和远程文件
function my_file_exists($file)
{
if(preg_match('/^http:\/\//',$file)){
//远程文件
if(ini_get('allow_url_fopen')){
if(@fopen($file,'r')) return true;
}
else{
$parseurl=pa
原创
2013-01-22 17:26:00 ·
487 阅读 ·
0 评论