私はCIが初めてで、通常のHMTLファイルをテンプレートとして使用しようとしました。そこで、「application/views」に「education」という名前のフォルダーを作成しました。header.php、navigation.php、content.php、footer.php ファイルを作成しました。私が書いたコントローラーで
class Education extends CI_Controller {
function index() {
$this->load->view('education/header');
$this->load->view('education/navigation');
$this->load->view('education/content');
$this->load->view('education/footer');
}
}
次に、「http://localhost:8080/mvc/index.php/education/」のようなリンクにアクセスしました。
ただし、ファイルと同じフォルダーにあるスタイルシートは添付されていません。また、スタイルシート リンクの href を「echo base_url();application/views/education/style.css」に変更してみました。しかし、それもうまくいきません。
どんな助けでも
ありがとう