无论如何,我的代码点火器安装中的索引页面(又名 homepage.php)都工作正常。
The problem lies with using subdirectories to store other pages, currently its setup like:
加载主页就像http://localhost/VAw_CI/
工作正常(加载homepage.php),这是在routes.php中设置的:
$route['default_controller'] = "pages/homepage";
在 config.php 中,我设置了:
$config['base_url'] = 'http://localhost/VAw_CI';
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';
我指定$config['index_page'] = '';
上面,因为我修改了位于的 .htaccesshtdocs
like:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*homepage/$0 [PT,L]
However, if I try to login on homepage.php, which is currently looks like:
它把我送到http://localhost/VAw_CI/pages/clientlogin
displaying:
I have controllers setup like:
这里给出了什么?当我访问时http://localhost/VAw_CI
,它有效地加载了views->pages->homepage.php
正确查看,但似乎任何其他视图都不起作用,我是否缺少页面某处的某些路径设置other比我的情况下的索引(homepage.php)?