2016-12-16 11 views
0

私はCodeIgniterで私のプロジェクトにブートストラップテンプレートを使用しようとしていますが、問題があります。私は、チュートリアルを以下だし、彼は.htaccessファイルにこのコンテンツを置く:codeigniterにブートストラップテンプレートを統合できません

RewriteEngine on 
RewriteCond $1 !^(index\.php|images|css|fonts|js|robots\.txt) 
RewriteRule ^(.*)$ /index.php/$1 [L] 

しかし、私はこのコンテンツと私の.htaccessファイルがあります:

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    # !IMPORTANT! Set your RewriteBase here and don't forget trailing and  
    leading 
    # slashes. 
    # If your page resides at 
    # http://www.example.com/mypage/test1 
    # then use 
    # RewriteBase /mypage/test1/ 
    RewriteBase /ci_introo/ 

    RewriteCond %{REQUEST_URI} ^system.* 
    RewriteRule ^(.*)$ /index.php?/$1 [L] 

    RewriteCond %{REQUEST_URI} ^application.* 
    RewriteRule ^(.*)$ /index.php?/$1 [L] 

    #RewriteCond $1 !^(index\.php|public|\.txt) 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php?/$1 [L] 
    </IfModule> 

    <IfModule !mod_rewrite.c> 
    # If we don't have mod_rewrite installed, all 404's 
    # can be sent to index.php, and everything works as normal. 
    # Submitted by: ElliotHaughin 

    ErrorDocument 404 /index.php 
    </IfModule> 

どのように私はこの問題を解決することができますか?

+0

あなたカントの使用:あなたがしたい すべてはあなたのautoload.php

にURLを追加し、head.php

application/views/head.php

<html> <head> <link rel="stylesheet" href="<?php echo base_url();?>assets/css/bootstrap.min.css" /> //place all css u need </head> 

コントローラーのコードでこれを置いていますテンプレートはどういう意味ですか? codeigniterでブートストラップのcssとjsを参照することはできません。それは...ですか???? – kishor10d

+0

私のホームページにブートストラップからの背景イメージを使用できません@ kishor10d –

+0

そのような大きな '' '.htaccess'''を書いている理由を理解できません。 – kishor10d

答えて

0

設定ファイルでurlヘルパーを自動読み込みする必要があります。

後藤application/config/autoload.php

この$autoload['helper'] = array();

を見つけると、このに変更します。

$autoload['helper'] = array('url');

+0

.. –

+0

はそう結果は、その後何であるか、もう一度それは致命的である – kishor10d

+0

はいまだない: –

0

あなたはそのための.htaccessを必要としません。

$this->load->view('header', $data); 
関連する問題