嗨,我是 CodeIgniter 的新手,正在学习教程。我遇到了一个错误
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: subview
Filename: admin/_layout_modal.php
Line Number: 7
An Error Was Encountered
Unable to load the requested file: .php
我按照教程到发球台,我似乎无法找出我哪里出错了。
这是控制器
<?php
class User extends Admin_Controller {
public function __construct() {
parent::__construct();
}
public function login() {
$this->data['subview'] = 'admin/user/login';
$this->load->view('admin/_layout_modal', $this->data);
}
}
和视图
<?php $this->load->view($subview); ?>
请帮忙...