あなたが直接ビューで取得する必要はありません。まず第一に。あなたはコントローラの方法でそれを取得する必要があります。あなたのケースメソッド名ではここedituser
であるあなたはURLからIDを取得することができますどのような方法である:私は詳細に説明
// Make sure your segment possition is correct and place few lines of code in starting of your method edituser()
$id = $this->uri->segment(3)) != '' && is_numeric($this->uri->segment(3)) && $this->uri->segment(3) > 0 ? $this->uri->segment(3) : false;
// After getting $id check if it is false or having value in it
if($id == false){
// If URL does not having id then it should show 404 error which is done by below line
show_404();
}
// Pass $id value for view file same as we pass other values.
希望。もしあなたがそれに問題があれば教えてください。