0
我正在開發一個codeigniter應用程序,並希望在我的應用程序中創建一個用戶對象,以便用於測試。創建用戶對象
以下代碼在後端控制器中運行,我不確定是否應該這樣做。
class Backend_Controller extends MY_Controller
{
public $current_user = new stdClass;
public $current_user->group = 'User Group';
public $current_user->name = 'Kevin Smith';
public function __construct()
{
parent::__construct();
}
}
謝謝你Rocket。 –
不客氣! :-) –