Home > Backend Development > PHP Tutorial > utf-8-ThinkPHP跳转链接前面怎样能不加根路径

utf-8-ThinkPHP跳转链接前面怎样能不加根路径

WBOY
Release: 2016-06-02 11:30:08
Original
668 people have browsed it

utf-8跳转thinkphpphp

showSuccess("注册成功",0,url("index","account"));
这是原本的注册成功后跳转到一个页面
现在我想跳转到一个外部页面 但如果只改为url(www.xxxxx.com)
最后会是 www.genlujing.com/www/xxxxx/com
这样肯定是不行的
function showSuccess($msg,$ajax=0,$jump='',$stay=0)
{
if($ajax==1)
{
$result['status'] = 1;
$result['info'] = $msg;
$result['jump'] = $jump;
header("Content-Type:text/html; charset=utf-8");
echo(json_encode($result));exit;
}
else
{
$GLOBALS['tmpl']->assign('page_title',$GLOBALS['lang']['SUCCESS_TITLE']." - ".$msg);
$GLOBALS['tmpl']->assign('msg',$msg);
if($jump=='')
{
$jump = $_SERVER['HTTP_REFERER'];
}
if(!$jump&&$jump=='')
$jump = APP_ROOT."/"; // 这里去掉也不行 还是会加上根路径
$GLOBALS['tmpl']->assign('jump',$jump);
$GLOBALS['tmpl']->assign("stay",$stay);
$GLOBALS['tmpl']->display("/Success.html");
exit;
}
}
success.html是用

<code> <meta http-equiv="refresh" content="3;URL={$jump}"></code>
Copy after login

跳转的
以上 要怎样改 能之间跳转到外部页面
目前试过了 $GLOBALS['tmpl']->display("/Success.html"); 直接到这个页面 然后将{$jump} 改为外部页面链接 也不行

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template