Php 404页面未找到您请求的页面未找到。-CodeIgniter

Php 404页面未找到您请求的页面未找到。-CodeIgniter,php,mysql,codeigniter,Php,Mysql,Codeigniter,大家好,我试着在CodeIgniter 1.7.1上工作,我已经完成了一步一步的安装 但这是一个明显的错误 404找不到页面 找不到您请求的页面 这是我使用的代码 controller home.php class Home extends Controller { function __construct() { parent:: __construct(); //$this->output->enable_profile

大家好,我试着在CodeIgniter 1.7.1上工作,我已经完成了一步一步的安装 但这是一个明显的错误 404找不到页面 找不到您请求的页面

这是我使用的代码

controller home.php

class Home extends Controller {
       function __construct()
       {
        parent:: __construct();
        //$this->output->enable_profiler();
        $this->load->library('DX_Auth'); 

    } 
class HomeModel extends Model {


    function __construct()
    {
        // Call the Model constructor
        parent::Model();

    }
<?php

    error_reporting(E_ALL);

    $system_folder = "system";


    $application_folder = "application";


if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder); 
}


define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');

if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }

    define('APPPATH', BASEPATH.$application_folder.'/');
}

/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;

/* End of file index.php */
/* Location: ./index.php */
模型homemodel.php

class Home extends Controller {
       function __construct()
       {
        parent:: __construct();
        //$this->output->enable_profiler();
        $this->load->library('DX_Auth'); 

    } 
class HomeModel extends Model {


    function __construct()
    {
        // Call the Model constructor
        parent::Model();

    }
<?php

    error_reporting(E_ALL);

    $system_folder = "system";


    $application_folder = "application";


if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder); 
}


define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');

if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }

    define('APPPATH', BASEPATH.$application_folder.'/');
}

/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;

/* End of file index.php */
/* Location: ./index.php */
.htaccess

RewriteCond $1 !^(index\.php|assets|xcache|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 
我正在使用localhost“XAMPP”

请帮帮我

和main index.php

class Home extends Controller {
       function __construct()
       {
        parent:: __construct();
        //$this->output->enable_profiler();
        $this->load->library('DX_Auth'); 

    } 
class HomeModel extends Model {


    function __construct()
    {
        // Call the Model constructor
        parent::Model();

    }
<?php

    error_reporting(E_ALL);

    $system_folder = "system";


    $application_folder = "application";


if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder); 
}


define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');

if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }

    define('APPPATH', BASEPATH.$application_folder.'/');
}

/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;

/* End of file index.php */
/* Location: ./index.php */
这条线是
$data['memcache']=新的memcache

可能.htaccess不在正确的目录中。。您可能想检查它,它应该在您的项目目录中。如果是,

将其放入.htaccess文件中

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

您可能还想检查您的
httpd.conf
文件,看看是否允许apache“尊重”您的.htaccess文件。搜索
AllowOverride
命令,并将其从
AllowOverride None
(默认)更改为
AllowOverride All


另外:不要忘了在之后重新启动httpd服务器。

您访问的是什么URL,以及根web文件夹中的index.php?我使用localhost/cashmusicIs有一个原因,那就是您为什么要使用
CI 1.7.1
2009年2月10日发布的
CI 2.1.3
10月8日发布的
,2012
是否可用?如果您正在制作此应用程序,则应使用最新版本的CI进行开发。很难在这么旧的版本上提供支持。我使用它是因为这是一个由其他开发人员开发的音乐应用程序,他们使用了它。。对于我现在尝试使用它,您可以通过此链接查看完整的源代码,如果您有任何解决方案可以完全使用它,请从上面的url,您的应用程序文件夹似乎在您的系统文件夹中?如果是这种情况,则需要更新index.php以从正确的目录加载应用程序文件<代码>$application\u folder=“系统/应用程序”是,它位于正确的目录localhost/cashmusic/.htaccess无boss仍然是相同的错误OK boss我安装在我的web服务器中,但它给了我这个“致命错误:在第21行的…/../../../paly/system/application/controllers/home.php中找不到类'Memcache'。我正在将代码放在顶部。也许您需要启用重写模块。”。。a2enmod重写,然后重新启动apache服务器,您还需要安装memcache。sudo apt get安装php5 memcache