我知道这个问题可能看起来重复,但我已经尝试了这些建议/建议,但仍然无法解决这个问题:环境 :$autoload['libraries'] = array('email', 'session', 'database', 'form_validation');控制器 :<?phpdefined('BASEPATH') OR exit('No direct script access allowed');class Auth extends CI_Controller {public function __construct(){ parent::__construct(); $this->load->library('form_validation'); $this->load->model('Auth_model', 'Auth');}private function _login() { $email = $this->input->post('email'); $password = $this->input->post('password'); $user = $this->model->Auth->getUser();模型 :<?php defined('BASEPATH') OR exit('No direct script access allowed');class Auth_model extends CI_Model{ public function getUser() { $email = $this->input->post('email'); // var_dump($email);die; return $this->db->get_where('t_user', ['email' => $email])->row_array(); }}我仍然收到此错误:遇到 PHP 错误严重性:通知消息:未定义的属性:Auth::$model文件名:控制器/Auth.php行号:38
- 2 回答
- 0 关注
- 90 浏览
添加回答
举报
0/150
提交
取消