寂寞流星 发表于 2010-8-21 20:55:27

为什么老是显示这个页面?

Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:system/application/views/welcome_message.php
The corresponding controller for this page is found at:system/application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

Page rendered in 0.0280 seconds

jeongee 发表于 2010-8-21 21:05:26

贴你的代码,以及你访问的url

寂寞流星 发表于 2010-8-21 21:06:46

全是默认的。

寂寞流星 发表于 2010-8-21 21:07:40

home.php
<?php


class Home extends Controller{
    function __construct(){
      parent::controller();   
    }
    function index(){
      $this->load->view('index');
    }



}


?>

寂寞流星 发表于 2010-8-21 21:08:49

views/index.php


<?php

echo "成功";


?>

jeongee 发表于 2010-8-21 21:18:36

请使用这个访问
http://127.0.0.1/ci路径/index.php/home

寂寞流星 发表于 2010-8-21 21:34:52

这样是成功了,可是怎么设置让他默认就直接显示呢?

jeongee 发表于 2010-8-21 21:54:13

麻烦看看手册
http://codeigniter.org.cn/user_guide/general/controllers.html

寂寞流星 发表于 2010-8-21 22:22:57

谢谢版主

寂寞流星 发表于 2010-8-21 22:38:39

我明白了,默认显示的话,
改这里。
$route['default_controller'] = "";
页: [1]
查看完整版本: 为什么老是显示这个页面?