Opauth和Codeigniter致命错误:无法访问空属性

Opauth和Codeigniter致命错误:无法访问空属性,codeigniter,oauth,twitter-oauth,Codeigniter,Oauth,Twitter Oauth,我使用图书馆进行社会认证。 授权时出错 致命错误:无法访问第1095行的/%my_目录%/system/core/Loader.php中的空属性 请告诉我这个错误与什么有关 它是ci_opauth.php $config['opauth_config'] = array( 'path' => '/oauth/login/', //example: /ci_opauth/auth/login/ 'callback_url' => '/o

我使用图书馆进行社会认证。 授权时出错

致命错误:无法访问第1095行的/%my_目录%/system/core/Loader.php中的空属性

请告诉我这个错误与什么有关

它是ci_opauth.php

 $config['opauth_config'] = array(
            'path' => '/oauth/login/', //example: /ci_opauth/auth/login/
            'callback_url' => '/oauth/authenticate/', //example: /ci_opauth/auth/authenticate/
            'callback_transport' => 'post', //Codeigniter don't use native session
            'security_salt' => 'Salt',
            'debug' => false,
            'Strategy' => array( //comment those you don't use
                                'Twitter' => array(
                                'key' => 'key',
                                'secret' = 'secret_key',
                    'name' => 'Twitter',
                    'description' => 'Войти с помощью twitter.com',
                    'tabimg' => "<img src=/assets/img/social-buttons/blank.gif width=16px height=16px style='background-position: 0 476px';>",
                    'signinimg' => "<img src=/assets/img/social-buttons/blank.gif width=89px height=21px style='background-position: 0 -42px';>"
                                                 )
                                       )
                                             )
                                           );
public function login(){
        //Comprobate if the user request a strategy
        if($this->uri->segment(3)==''){
            $ci_config = $this->config->item('opauth_config');
            $arr_strategies = array_keys($ci_config['Strategy']);

            echo("Please, select an Oauth provider:<br />");
            echo("<ul>");
            foreach($arr_strategies AS $strategy){
                echo("<li><a href='".base_url()."oauth/login/".strtolower($strategy)."'>Login with ".$strategy."</li>");
            }
            echo("</ul>");
        }   
        else{
            //Run login
            $this->load->library('Opauth/Opauth', $this->config->item('opauth_config'), false);
            $this->opauth->run();    
        }     
    }

    function authenticate(){
        //Create authenticate logic
        $response = unserialize(base64_decode( $_POST['opauth'] ));
        echo("<pre>");
        print_r($response);
        echo("</pre>");
    }
$config['opauth\u config']=数组(
'path'=>'/oauth/login/,//示例:/ci_opauth/auth/login/
'callback_url'=>'/oauth/authenticate/,//示例:/ci_opauth/auth/authenticate/
'callback_transport'=>'post',//Codeigniter不使用本机会话
“安全盐”=>“盐”,
'debug'=>false,
'Strategy'=>array(//注释不使用的内容
'Twitter'=>数组(
“键”=>“键”,
“secret”=“secret\u key”,
'name'=>'Twitter',
“description”=>“推特网站”,
“tabimg”=>“”,
“签名”=>“”
)
)
)
);
它是oauth.php

 $config['opauth_config'] = array(
            'path' => '/oauth/login/', //example: /ci_opauth/auth/login/
            'callback_url' => '/oauth/authenticate/', //example: /ci_opauth/auth/authenticate/
            'callback_transport' => 'post', //Codeigniter don't use native session
            'security_salt' => 'Salt',
            'debug' => false,
            'Strategy' => array( //comment those you don't use
                                'Twitter' => array(
                                'key' => 'key',
                                'secret' = 'secret_key',
                    'name' => 'Twitter',
                    'description' => 'Войти с помощью twitter.com',
                    'tabimg' => "<img src=/assets/img/social-buttons/blank.gif width=16px height=16px style='background-position: 0 476px';>",
                    'signinimg' => "<img src=/assets/img/social-buttons/blank.gif width=89px height=21px style='background-position: 0 -42px';>"
                                                 )
                                       )
                                             )
                                           );
public function login(){
        //Comprobate if the user request a strategy
        if($this->uri->segment(3)==''){
            $ci_config = $this->config->item('opauth_config');
            $arr_strategies = array_keys($ci_config['Strategy']);

            echo("Please, select an Oauth provider:<br />");
            echo("<ul>");
            foreach($arr_strategies AS $strategy){
                echo("<li><a href='".base_url()."oauth/login/".strtolower($strategy)."'>Login with ".$strategy."</li>");
            }
            echo("</ul>");
        }   
        else{
            //Run login
            $this->load->library('Opauth/Opauth', $this->config->item('opauth_config'), false);
            $this->opauth->run();    
        }     
    }

    function authenticate(){
        //Create authenticate logic
        $response = unserialize(base64_decode( $_POST['opauth'] ));
        echo("<pre>");
        print_r($response);
        echo("</pre>");
    }
公共函数登录(){
//如果用户请求策略,则进行压缩
如果($this->uri->segment(3)=''){
$ci_config=$this->config->item('opauth_config');
$arr_strategies=array_key($ci_config['Strategy']);
echo(“请选择Oauth提供程序:
”); 回声(
    ); foreach($arr_策略作为$strategy){ echo(
  • 使用“$strategy.”登录“
  • ”; } 回声(“
”); } 否则{ //运行登录 $this->load->library('Opauth/Opauth',$this->config->item('Opauth_config'),false); $this->opauth->run(); } } 函数身份验证(){ //创建验证逻辑 $response=unserialize(base64_解码($_POST['opauth']); 回声(“”); 打印(回复); 回声(“”); }

如果您需要提供更多信息,为了回答我的问题,请告诉我如果加载程序不工作,您可以使用classic
require


require('application/libraries/Opauth/Opauth.php')$opauth=newopauth($this->config->item('opauth_config'))$opauth->run()它没有帮助,或者我做错了什么?你有错误还是其他什么?考虑到你不再使用CodeIgniter加载器,你应该有一个不同的行为。这是一个奥帕斯图书馆的问题。您不应该显示您的客户端密钥和ID。请确保您的配置和Opauth库版本。您好,我从这里下载了最新版本的Codeigniter framework和openauth,进行了集成并将其放在我的主机上。同样的结果。什么是可能有一个错误。。。