Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess CodeIgniter 3.0.0项目没有';在子域上不工作_.htaccess - Fatal编程技术网

.htaccess CodeIgniter 3.0.0项目没有';在子域上不工作

.htaccess CodeIgniter 3.0.0项目没有';在子域上不工作,.htaccess,.htaccess,我使用CI(3.0.0版)创建了一个项目,它在XAMPP localhost中工作得非常好。然后我把那个项目上传到子域,然后它给出了一个错误 我也处理路由器和配置设置。那么这个错误是什么呢??如何避免这种情况??有一些答案,但不适合这个 Config.php $config['base_url'] = ''; $config['index_page'] = ''; Routes.php $route['default_controller'] = 'shop'; $route['404_ove

我使用CI(3.0.0版)创建了一个项目,它在XAMPP localhost中工作得非常好。然后我把那个项目上传到子域,然后它给出了一个错误

我也处理路由器和配置设置。那么这个错误是什么呢??如何避免这种情况??有一些答案,但不适合这个

Config.php

$config['base_url'] = '';
$config['index_page'] = '';
Routes.php

$route['default_controller'] = 'shop';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
.htaccess文件

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule>

重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php/$1[L]

将控制器、模型和类的其他名称更改为大写

例如: 您自己的控制器
test.php
更改为
test.php

应该是工作


这是因为您的服务器是Linux,Linux区分大小写。

更改控制器、型号和其他类的名称,使其大写

例如: 您自己的控制器
test.php
更改为
test.php

应该是工作


这是因为您的服务器是Linux,Linux区分大小写。

它的php错误是正确的。检查服务器使用的php版本查看github上的3.0.0源代码,第104行与此错误无关。你能再检查一下你的版本吗?@MichaelCoxon在我的服务器PHP版本5.4.38中。所以这应该是工作,我想我是指代码点火器版本。。第58行附近的system/core/codeigniter.php应该类似于
define('CI_VERSION','3.0.0')@MichaelCoxon define('CI_VERSION','3.0.0');这在第58行,它的php错误是正确的。检查服务器使用的php版本查看github上的3.0.0源代码,第104行与此错误无关。你能再检查一下你的版本吗?@MichaelCoxon在我的服务器PHP版本5.4.38中。所以这应该是工作,我想我是指代码点火器版本。。第58行附近的system/core/codeigniter.php应该类似于
define('CI_VERSION','3.0.0')@MichaelCoxon define('CI_VERSION','3.0.0');这已经在第58行了