2016-11-23 5 views
0

Hyすべて、私はcodeigniterでサイトを作って、ローカルサーバー上でうまく動作しました。ライブサーバーにアップロードしました:ドメイン名(http://fantastictravels.co/)と「このfantastictravels.coページが見つかりません」ローカルサーバーからcodeigniterサイトをアップロードしてライブ

私は多くの異なることを試みましたが、機能しませんでした。

コントローラ:

<?php 

class Travels extends CI_Controller { 

    function __construct(){ 
     parent :: __construct(); 
     $this->load->model('travel'); 
    } 

    public function index() 
    { 

     $this->load->view('index'); 
    } 
} 

ビュー:私のconfigファイルで

<head> 
    <meta http-equiv="Content-Language" content="en-us"> 
    <title></title> 
    <meta charset="utf-8"> 
    </head> 
<body> 

    <div class="content"> 

     This is test 
    </div> 
</body> 
</html> 

、BASE_URLは "http://fantastictravels.co/" であると、私のここでのビューとコントローラの私のコードがありますすべてのファイルはルートディレクトリ "http://fantastictravels.co/"にあります。 お願いします。

+0

ホストファイルシステムのイメージも追加 –

+0

.htaccessファイル? – phobia82

+0

あなたはスタイルガイドにアクセスしていますか? http://www.codeigniter.com/user_guide/general/styleguide.html#file-naming – user4419336

答えて

0

私のコントローラとモデルファイル名のように小文字にした見えますことを確認してくださいあなたの.htaccessファイルでこれを入れています私は大文字に変更され、修正されました... :)

0

第1回、ビューファイルという名前のindex.phpがありますか? ビューファイルはビューフォルダにありますか?

DirectoryIndex index.php 
RewriteEngine on 

RewriteCond $1 !^(index\.php| (.*)\.swf|forums|images|css|downloads|js|robots\.txt|favicon\.ico) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA] 

は、あなたの設定ファイルに移動し、この行はこの

$config['index_page'] = ''; 
関連する問題