[英]stream_context_get_params() is not a function codeigniter
i am using 'codeigniter-facebook-google-login' library 我正在使用'codeigniter-facebook-google-login'库
Fatal error: Call to undefined function stream_context_get_params() in /application/libraries/oauth2/Provider.php on line 203 致命错误:在第203行的/application/libraries/oauth2/Provider.php中调用未定义的函数stream_context_get_params()
the code is as following....... 代码如下。
$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);
my php version is 5.4.38 on server as per the php document stream_context_get_params is supported greater than the 5.3.0v 我的php版本在服务器上是5.4.38,因为php文档stream_context_get_params支持的版本大于5.3.0v
any one know what is the problem or alternative of the problem... 任何人都知道问题是什么或问题的替代方案...
I dont know the library but the error is clear. 我不知道图书馆,但错误很明显。 Inspect the file "Provider.php" and ensure that either the function is declared somewhere in that file or that is requiring a file with the function that is missing.
检查文件“ Provider.php”,并确保该函数在该文件中的某个地方声明,或者需要一个缺少该函数的文件。 I am sure the function is available somewhere you just need to make it available in "Provider.php" and all will be good
我确信该功能在您只需在“ Provider.php”中使其可用的某个位置可用,一切都会很好
Edit: as per your comment this is a native function of php 5.3> so if not available you must be running older version of php 编辑:根据您的评论,这是php 5.3的本机功能,因此,如果不可用,您必须运行旧版本的php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.