-1

为什么我收到错误:我的代码:

<li><a href="<?php echo base_url(); ?>welcome/logout">Log Out</a></li>

错误 :

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
11/05/13 17:20:15
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1
4

2 回答 2

0

以下是机会

  1. 您可以将其设为空 $config['base_url'] = '';
  2. 使用 index.php 文件检查根文件夹中的 .htaccess
  3. 检查 mod_rewrite apache 模块是否已启用

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

于 2013-11-05T10:26:28.810 回答
0

你在你的控制器上使用过这个指令吗?

$this->load->helper('url');
于 2013-11-05T10:28:47.783 回答