例を探しましたが、奇妙な結果が出ています
ページテーブルの行1のマークアップ列をデータベースから返すために、次の/ pages /1URLを発生させたいと思います。
コントローラ
パブリック関数index()
{{
$ id = $ this-> uri-> segment(2);
$ content = $ this-> page-> SpecificMarkup($ id);
$ this-> template-> set('nav'、'support');
$ this-> template-> set('content'、$ content);
$ this-> template-> load('master'、'contact');
}
モデル
パブリック関数specificMarkup($ id)
{{
$ query = $ this-> db-> get_where('pages'、$ id);
$ row = $ query-> row();
$row->markupを返します。
}
$ idを具体的に設定すると機能しますが、セグメントを使用しようとすると404エラーが返されるようになりました。ユーザーガイドには、これが機能するはずだという印象があります。