我正在尝试创建一个简单的模块来测试事情,每当我转到模块页面http://mysite.com/testmodule时,我都会收到“禁止访问,拒绝访问”错误。
该模块唯一要做的就是回显一个测试字符串:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class testmodule extends Public_Controller
{
/**
* Constructor method
*
* @author PyroCMS Dev Team
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
echo 'test';
}
}
知道为什么会发生这种情况吗?