我使用CI v2.0.3,xampp windows 1.7.0,並將CI文件夾重命名爲「Hello」
我在應用程序/控制器上創建了一個Blog.php。未執行控制器:錯誤404
blog.php的的內容是:
<?php
if(!defined('BASEPATH')) exit('No Direct Script Access Allowed');
class Blog extends CI_Controller {
function __construct()
{
parent::__construct();
}
function index()
{
echo "Haloo.. CI pertama";
}
}
我要訪問localhost:8080/hello/index.php/blog
或localhost:8080/hello/index.php/Blog
但他們兩人仍顯示404 not found
。
這就是我期望的:「Haloo .. CI pertama」。
if(!! defined('BASEPATH'))is this typo? – Samson 2012-08-04 12:35:36
@radashk如果我比較CI默認控制器的例子,它似乎是一個錯字。 – TomShreds 2012-08-04 12:38:18
thx爲更正,但404仍未找到.. – adadeh 2012-08-04 12:38:27