阅读:10
修改ReadFiletext方法直接替换即可
文件目录:/e/class/connect.php
//取得文件内容
function ReadFiletext($filepath){
$filepath=trim($filepath);
$htmlfp=@fopen($filepath,"r");
//远程
if(strstr($filepath,"://"))
{
while($data=@fread($htmlfp,500000))
{
$string.=$data;
}
if($string==""){
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
"allow_self_signed"=>true,
),
);
$string = file_get_contents($filepath, false, stream_context_create($arrContextOptions));
// echo "远程".$string."<br>";
}
// 可以根据需要对$imageData进行处理,例如保存到本地文件
// file_put_contents('/local_image.jpg?_600h_75Q_r', $imageData);
}
//本地
else
{
$string=@fread($htmlfp,@filesize($filepath));
}
@fclose($htmlfp);
return $string;
}
上一篇:支付宝小程序 webview my.uploadFile 文件不存在 下一篇:js 导出pdf 实现 pdf导出源代码