我下面這個教程:用戶級的基於導航
http://www.yiiframework.com/wiki/191/implementing-a-user-level-access-system/
但我不斷收到錯誤:
包括(user.php的)[]:未能打開流:沒有這樣的文件或目錄
我不會張貼整個堆棧跟蹤,但YiiBase.php有一個錯誤的信號線423:
include($className.'.php');
任何人都可以幫我嗎?
但在該教程任何地方沒有提到創建一個類稱爲用戶,只需LevelLookUp,這就是爲什麼我很困惑:/
我想我知道我要去哪裏錯了,我沒有一個模型!
有人能解釋什麼,我需要更多關於做:
public function authenticate()
{
$username = strtolower($this->username);
// from database... change to suite your authentication criteria
// -- Nope, I wont include mine --
$user = User::model()->find('LOWER(username)=?', array($username));
你怎麼設置$ className?這也是一條相對路徑。 – chovy
嗯......沒有這樣的文件或目錄;-) $ className包含'User'。所以它正在尋找'User.php',那不是那裏。 – Sepster