用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2520|回复: 2
收起左侧

[已解决] Fatal error: Cannot access protected property Share::$email in E:\work\sf\sy...

[复制链接]
发表于 2015-2-3 11:00:06 | 显示全部楼层 |阅读模式
本帖最后由 635265428 于 2015-2-3 11:02 编辑

PHP复制代码
 
 
报错:Fatal error: Cannot access protected property Share::$email in E:\work\sf\system\core\Loader.php on line [i]1095
 
 
public function send_email(){
        $sl= $this->input->post('sl');
        $mails = $this->input->post('mails');
        if(!$mails){
            return;
        }
       
        //加载CI的email类
        $this->load->library('email');
        //以下设置Email内容
        $host = 'http://'.$_SERVER['HTTP_HOST'];
        $url =  $host.'/d/'.$sl;
        $html = '';
        $this->email->from('FROM_MAIL, '');
        $this->email->to($mails);
        $this->email->subject('
邮件);
        $this->email->message($html);
        $this->email->send();
        return;
    }
 
怎么回事????
[/i]
 
 
复制代码

发表于 2015-2-3 11:11:19 | 显示全部楼层
你的 PHP 是什么版本的?
 楼主| 发表于 2015-3-10 15:18:54 | 显示全部楼层
是我的问题, 我已经定义protected $email属性,和email类冲突了

本版积分规则