|
本帖最后由 cimaster 于 2015-3-30 11:14 编辑
A PHP Error was encounteredSeverity: Notice
Message: Undefined property: Index:load
Filename: controllers/index.php
Line Number: 8
NULLA PHP Error was encounteredSeverity: Notice
Message: Undefined property: Index:load
Filename: controllers/index.php
Line Number: 9
Fatal error: Call to a member function view() on a non-object in D:\WWW\ci-day01\CodeIgniter-2.2-stable\application\controllers\index.php on line 9
几天 出用 CI安装以后 看文档 研究了一下,调用了个视图 默认调用
控制器:welcome
方法:index
$this->load->view('welcome_message');
一点毛病没有
我将router文件里面的default welcome改成index
控制器:welcome
方法:index
$this->load->view('welcome_message');
出现报错
打印var_dump($thi->load);
是NULL
走默认控制器的默认方法的时候,有对象
object(CI_Loader)#12 (12) { ["_ci_ob_level":protected]=> int(1) ["_ci_view_paths":protected]=> array(1) { ["application/views/"]=> bool(true) } ["_ci_library_paths":protected]=> array(2) { [0]=> string(12) "application/" [1]=> string(46) "D:/WWW/ci-day01/CodeIgniter-2.2-stable/system/" } ["_ci_model_paths":protected]=> array(1) { [0]=> string(12) "application/" } ["_ci_helper_paths":protected]=> array(2) { [0]=> string(12) "application/" [1]=> string(46) "D:/WWW/ci-day01/CodeIgniter-2.2-stable/system/" } ["_base_classes":protected]=> &array(11) { ["benchmark"]=> string(9) "Benchmark" ["hooks"]=> string(5) "Hooks" ["config"]=> string(6) "Config" ["utf8"]=> string(4) "Utf8" ["uri"]=> string(3) "URI" ["router"]=> string(6) "Router" ["output"]=> string(6) "Output" ["security"]=> string(8) "Security" ["input"]=> string(5) "Input" ["lang"]=> string(4) "Lang" ["loader"]=> string(6) "Loader" } ["_ci_cached_vars":protected]=> array(0) { } ["_ci_classes":protected]=> array(0) { } ["_ci_loaded_files":protected]=> array(0) { } ["_ci_models":protected]=> array(0) { } ["_ci_helpers":protected]=> array(0) { } ["_ci_varmap":protected]=> array(2) { ["unit_test"]=> string(4) "unit" ["user_agent"]=> string(5) "agent" } }
请大侠指教 在线坐等。。。。。。
|
|