三个方法同时传入 U(MODULE_NAME . '/Public/index') 这个URL参数时候php
redirect生成的地址会多个index.php,致使访问出错, 可是当使用URL_MODEL=2伪静态时候却没有问题函数
查看redirect源代码 :url
/** * Action跳转(URL重定向) 支持指定模块和延时跳转 * @access protected * @param string $url 跳转的URL表达式 * @param array $params 其它URL参数 * @param integer $delay 延时跳转的时间 单位为秒 * @param string $msg 跳转提示信息 * @return void */ protected function redirect($url,$params=array(),$delay=0,$msg='') { $url = U($url,$params); redirect($url,$delay,$msg); }
由于redirect须要的是字符串不是U函数生成的地址!code
success 和 error 则不一样的是,他们内部没有使用U生成须要传入时生成URL 。字符串