转载: PHP读取远程文件的4种方法https://www.cnblogs.com/gide/p/4437879.html

1. fopen, fread 1 if($file = fopen("http://www.example.com/", "r")) { 2 while(!feof ($file)) 3 $data .= fread($file, 1024); 4 } 5 fclose($file); 2. file_get_contents 很简单的一句话: $data = file_get_contents
相关文章
相关标签/搜索