我有以下代码,我正在尝试理解并找到解决此错误的方法。
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Tank_auth::$users
Filename: libraries/Tank_auth.php
Line Number: 188
Fatal error: Call to a member function UpdateProfileInfo() on a non-object in /home/xtremer/public_html/kowmanager/application/libraries/Tank_auth.php on line 188
Tank Auth Controller:http://pastebin.com/iRj11hgR Tank Auth模型:http://pastebin.com/qhNK5Whz Tank Auth Library:http://pastebin.com/RVxdzhUa
编辑:感谢Marc,他能够找到问题,但我确实有一个奇怪的新问题。
A PHP Error was encountered
Severity: Notice
Message: Undefined index: userID
Filename: libraries/Tank_auth.php
Line Number: 188
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/xtremer/public_html/system/core/Exceptions.php:170)
Filename: libraries/Session.php
Line Number: 671
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/xtremer/public_html/system/core/Exceptions.php:170)
Filename: helpers/url_helper.php
Line Number: 543
答案 0 :(得分:1)
看来你的tank_auth / users.php模型没有加载,或者某处存在命名冲突。你的$ autoload数组是什么样的?
答案 1 :(得分:1)
可能相关:
第187行:$this->ci->users
$this->users->UpdateProfileInfo(...);
忘记了Tank Auth Library中的->ci
?