635265428 发表于 2015-2-3 11:00:06

Fatal error: Cannot access protected property Share::$email in E:\work\sf\sy...

本帖最后由 635265428 于 2015-2-3 11:02 编辑



报错:Fatal error: Cannot access protected property Share::$email in E:\work\sf\system\core\Loader.php on line 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;
    }

怎么回事????



Hex 发表于 2015-2-3 11:11:19

你的 PHP 是什么版本的?

635265428 发表于 2015-3-10 15:18:54

是我的问题, 我已经定义protected $email属性,和email类冲突了
页: [1]
查看完整版本: Fatal error: Cannot access protected property Share::$email in E:\work\sf\sy...