QQ登陆插件 防止file_get_contents函数导致服务500的方法

今天测试了一下QQ登陆插件 .不知道是为何一直导致服务器500.
最后发现是file_get_contents函数导致的.
于是做了一下小修改.来防止这个超时.如果你的主机也出现这个问题.那就拿去用吧.
打开pluginspubsqqdo.php
找到.if(!is_file($dfile)){ 在下面添加
$opts = array(
'http'=>array(
'method'=>"GET",
'timeout'=>3,
)
);
$context = stream_context_create($opts);
把 $img = file_get_contents($face); 修改为
$img = file_get_contents($face, false, $context);
OK~ 
http://www.thinksaas.cn/topics/0/22/22708.html

全文:http://www.thinksaas.cn/topics/0/22/22708.html //我在本地测试的时候没有报500错误,但是上传到空间就报500服务器错误。为什么??

posted @ 2016-11-16 23:01  stma  阅读(163)  评论(0)    收藏  举报