【发布时间】:2015-01-29 03:32:20
【问题描述】:
当我上传到主机时,我的网站无法正常工作,但它可以在 localhost 中工作。 当我尝试访问 url 时,它总是显示 ERROR - 12-01-14 06:33:25 --> 404 Page Not Found: /index (日志文件),我得到了错误。
这是我的主机用户名和密码 在此处访问控制面板:
- https://cp.supremecenter300.com
- 客户 ID:142606
- 登录:hengsopheak
-
密码:2142885
defined('BASEPATH') OR exit('不允许直接脚本访问');
函数 __autoload($classname) { if (strpos($classname, 'CI_') !== 0) { $文件 = APPPATH 。 '库/' 。 $类名。 '.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'; // 实验性当前未使用
$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'] = '应用程序/视图/错误';
$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'] = 假; $config['sess_encrypt_cookie'] = TRUE; $config['sess_use_database'] = 真; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = 真; $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'] = 假; $config['cookie_httponly'] = FALSE;
和路由器
$route['default_controller'] = 'page';
$route['cat/(:num)'] = 'cat/index/$1/$2/$3';
$route['detail/(:num)'] = 'detail/index/$1/$2';
$route['404_override'] = '';
在 Controller 文件名:page 类名: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);
}
?>
和.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>
我只收到此消息 消息:include(): 未能打开“application/views/errorshtml/error_404.php”以包含 (include_path='.;c:\php\pear')
我现在该怎么办
【问题讨论】:
-
从不分享您的托管详细信息从问题中删除
-
我现在不关心安全性我只想让它工作?
-
显示此错误是因为您提供了错误的路径,您的路径是 application/views/errors/html/error_404.php
-
不是这个,我越来越多地改变它,我尝试了 2 周但仍然不行
-
我的嘘声几乎要了我的命
标签: php .htaccess codeigniter web-config