dongzenglin8292 2015-03-07 06:37
浏览 88

stream_context_get_params()不是函数codeigniter

i am using 'codeigniter-facebook-google-login' library

Fatal error: Call to undefined function stream_context_get_params() in /application/libraries/oauth2/Provider.php on line 203

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

any one know what is the problem or alternative of the problem...

  • 写回答

1条回答 默认 最新

  • doudou2121 2015-03-08 09:40
    关注

    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. I am sure the function is available somewhere you just need to make it available in "Provider.php" and all will be good

    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

    评论

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?