使用的独立分组,配置文件如下:
<?php
return array(
//'配置项'=>'配置值'
//'URL_CASE_INSENSITIVE' =>true,
'APP_GROUP_LIST' => 'Index,Admin',
'DEFAULT_GROUP' => 'Index',
'APP_GROUP_MODE' => 1,
'APP_GROUP_PATH' => 'Modules',
//'URL_MODEL' => 1,
//'SHOW_PAGE_TRACE' =>true,
);
?>IndexAction.class.php文件如下p函数是一个公用的自定义打印函数
<?php
/**
* 前台控制器
*/
class IndexAction extends Action{
public function index(){
echo 111;
p(I('get.'));
echo '<a href = "'.U('Index/Index/index',array('a'=>1)).'">AA</a>';echo '<br>';
echo '<a href = "'.U('Index/Index/logout').'">Index/Index/logout</a>';
//$this->display();
}
public function logout(){
p(I('get.'));
echo 1222;
session_unset();
session_destroy();
}
}
?>然后,点击超链接AA,会提示“非法操作:1”为什么不能打印出来GET参数a=1呢?
截图如下:


求解
最佳答案