[英]stream_context_get_params() is not a function codeigniter
我正在使用'codeigniter-facebook-google-login'库
致命错误:在第203行的/application/libraries/oauth2/Provider.php中调用未定义的函数stream_context_get_params()
代码如下。
$opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => http_build_query($params),));
$_default_opts = stream_context_get_params(stream_context_get_default());
$context = stream_context_create(array_merge_recursive($_default_opts['options'], $opts));
$response = file_get_contents($url, false, $context);
$return = json_decode($response, true);
我的php版本在服务器上是5.4.38,因为php文档stream_context_get_params支持的版本大于5.3.0v
任何人都知道问题是什么或问题的替代方案...
我不知道图书馆,但错误很明显。 检查文件“ Provider.php”,并确保该函数在该文件中的某个地方声明,或者需要一个缺少该函数的文件。 我确信该功能在您只需在“ Provider.php”中使其可用的某个位置可用,一切都会很好
编辑:根据您的评论,这是php 5.3的本机功能,因此,如果不可用,您必须运行旧版本的php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.