<?php
namespace app\index\controller;
class At extends Common
{
public function hi($name)
{
if ($name == 'thinkphp')
{
return $this->redirect('http://www.baidu.com',302);
}else{
return $this->error('登录失败','ds');
}
}
public function cg()
{
return '登录成功跳转';
}
public function ds()
{
return '登录失败跳转';
}
}以上代码在302跳转的过程中没有任何问题,但是当我将url替换成另外一个的时候。问题出现了。<?php
namespace app\index\controller;
class At extends Common
{
public function hi($name)
{
if ($name == 'thinkphp')
{
return $this->redirect('mqqapi://card/show_pslcard?src_type=internal&version=1&uin=1921779545&card_type=person&source=sharecard',302);
}else{
return $this->error('登录失败','ds');
}
}
public function cg()
{
return '登录成功跳转';
}
public function ds()
{
return '登录失败跳转';
}
}当我将重定向的url替换成mqqapi协议的时候,报如下错误。
这个show_pslcard按道理来说只是这个mqqapi协议的url其中的一部分,不知道为什么会出现这样的错误。
最佳答案