namespace appindexcontroller;
use thinkController;
class Index extends Controller
{
public function _initialize()
{
echo 'init<br/>';
}
public function hello()
{
return 'hello';
}
public function data()
{
return 'data';
}
}
如果访问
http://localhost/index.php/index/Index/hello
会输出
init
hello
如果访问
http://localhost/index.php/index/Index/data
会输出
init
data