私は次のコントローラーを持っています (supernavigationloggedin):
<?php
class Supernavigationloggedin extends CI_Controller {
function index(){
#get current session id
$currentSessionID = $this->session->userdata('session_id');
#get all the account row for the given sessionID
$data['info'] = $this->db->get_where('Client', array('session_id'=>$currentSessionID))->row();
#views
$this->load->view('supernavigationloggedin',$data);
}
}
?>
そして、(supernavigationloggedin) という名前の次のビュー:
<div id="superNavigation">
<h5><strong>Welcome</strong>, <?php $info->fname; ?> <a href="#">Account Settings</a></h5>
<div class="clearL"> </div>
</div
>
オンラインでエラーをスローし続けます:<h5><strong>Welcome</strong>, <?php echo $info['fname']; ?> <a href="#">Account
そのメッセージ: >>> Trying to get property of non-object
私は試しました:<?php echo $info['fname']; ?> <?php echo $info->fname; ?>
しかし、どちらもうまくいかないようです。