定义路由规则:
‘URL_ROUTE_RULES‘ => array( //定义路由规则 ‘new/:id\d‘ => ‘News/read‘, ‘new/:name‘ => ‘News/read‘, ‘new/:year\d/:month\d‘ => ‘News/archive‘, ),
访问时便可以用下面的地址:
http://serverName/index.php/new/8
跳转页面:
redirect(U("Form/regist"),1,"用户名不存在,即将跳转注册"); $this->redirect(U("Form/regist"),1,"用户名不存在,即将跳转注册");//这句只会打印出内容而不会跳转
快速学习Thinkphp3.1(多数来自thinkphp3.1快速入门)
原文:http://www.cnblogs.com/cmj97/p/6341338.html