-1
我要去檢查當前用戶ID和獲取信息是男是女,但condn假要登錄後纔可查看登錄會話ID在笨
public function profile() {
$this->load->view('header');
$uname = $this->session->userdata('uname');
$row = $this->brid_groom_fetch->get_program_specific_gender();
if ($row['uname']->uname == $uname) {
$session_id = $this->session->userdata('session_id');
var_dump($session_id);
} else {
echo 'fail';
}
}
您需要添加一些更多的細節來回答這個問題。控制器方法沒有錯誤。 'brid_groom_fetch'是模型還是圖書館?該方法看起來如何?會議如何設置?你有任何錯誤? – jtheman
我得到會話數據Array([__ci_last_regenerate] => 1464684288 [logged] => 1 [uname] => [email protected] [logged_in] => 1) – sms
和db數據([__ci_last_regenerate] => 1464684288 [登錄] => 1 [uname] => [email protected] [logged_in] => 1)Array([0] => stdClass Object([bride_grum_id] => 1 [name] => admin @ 2016 [膚色] => ssssssss – sms