为什么我上传到托管时会在codeigniter中出现error_404.php错误?

my website doesn't work when i upload to hosting but it is work in localhost. and when I try to access url it alwasy show me ERROR - 12-01-14 06:33:25 --> 404 Page Not Found: /index (log file) and I got errors.

Here is my hosting user name and password Access the Control Panel here:

  • https://cp.supremecenter300.com
  • Client ID: 142606
  • Login: hengsopheak
  • Password: 2142885

    defined('BASEPATH') OR exit('No direct script access allowed');

    function __autoload($classname) { if (strpos($classname, 'CI_') !== 0) { $file = APPPATH . 'libraries/' . $classname . '.php'; if (file_exists($file)) { @include_once($file); } } }

    $config['base_url'] = '';

    $config['index_page'] = '';

    $config['uri_protocol'] = 'PATH_INFO';

    $config['url_suffix'] = '';

    $config['language'] = 'english';

    $config['charset'] = 'UTF-8';

    $config['enable_hooks'] = FALSE;

    $config['subclass_prefix'] = 'MY_';

    $config['composer_autoload'] = FALSE;

    $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';

    $config['allow_get_array'] = TRUE; $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; // experimental not currently in use

    $config['log_threshold'] = 4;

    $config['log_path'] = '';

    $config['log_file_extension'] = 'php';

    $config['log_date_format'] = 'm-d-y H:i:s';

    $config['error_views_path'] = 'application/views/errors';

    $config['cache_path'] = '';

    $config['encryption_key'] = 'sdfasdfasdfasdfadf';

    $config['sess_driver'] = 'cookie'; $config['sess_valid_drivers'] = array(); $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7720; $config['sess_expire_on_close'] = FALSE; $config['sess_encrypt_cookie'] = TRUE; $config['sess_use_database'] = TRUE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = TRUE; $config['sess_match_useragent'] = TRUE; $config['sess_time_to_update'] = 300;

    $config['cookie_prefix'] = ''; $config['cookie_domain'] = 'vtrashop.com/'; $config['cookie_path'] = '/'; $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE;

and Router

$route['default_controller'] = 'page';
$route['cat/(:num)'] = 'cat/index/$1/$2/$3';
$route['detail/(:num)'] = 'detail/index/$1/$2';
$route['404_override'] = '';

In Controller file name:page Class name: Page.

<?php

Class Page extends Frontend_controller {

    public function __construct() {
        parent::__construct();

    }

    public function index() {

         $this->data['subview'] = 'page';
        $this->load->view('_main_layout', $this->data);
        }
?>

and .htaccess

# Set PHP Time Zone:
#SetEnv TZ America/New_York
<IfModule mod_rewrite.c>

#Option +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond $1 !^(index\.php|pages|video|images|social|style|sliderengine|bar|robots\.text)

RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

</IfModule>

I get only this messages Message: include(): Failed opening 'application/views/errorshtml/error_404.php' for inclusion (include_path='.;c:\php\pear')

How can I do now

查看全部
dongzengzai4567
dongzengzai4567
2014/12/01 06:54
  • codeigniter
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复