//取得文件内容 function ReadFiletext($filepath){ $filepath=trim($filepath); $ishttp=0; if(strstr($filepath,'://')) { if(!eToCheckIsUrl2($filepath)) { return ''; } $ishttp=1; } $htmlfp=@fopen($filepath,"r"); //远程 if($ishttp==1) { while($data=@fread($htmlfp,500000)) { $string.=$data; } } //本地 else { //clearstatcache(); $string=@fread($htmlfp,@filesize($filepath)); //$string=file_get_contents($filepath); } @fclose($htmlfp); return $string; }
这是/e/class/connect.php文件中函数
|