我正在为Facebook开发一个应用程序TAB。从理论上讲,我想在粉丝和非粉丝之间创建一个重定向(经典的粉丝门)......但我对数据库没有问题!
----- First example, work only with HTTPS and not HTTP :/
$fan = 'https://website.com/fan.html';
$nofan = 'https://website.com/nofan.html';
----- Second example i get it form database and doesn't work :@
$fan = $app_data[5]; //if I print this > https://website.com/fan.html
$nofan = $app_data[6]; //if I print this > https://website.com/nofan.html
然后我把它放进去:
if (1<2) {
echo header( "Location:".$fan); exit;}
else {
echo header( "Location:".$nofan); exit;}
感谢您的关注。我希望我解释得很好,并期待建议..
已解决:正如您在此处看到的> http://jsfiddle.net/x2F8s/1/基于 php 标头位置的重定向在 iframe O.o STRANGE 中不起作用 :O
你应该试试这个
if (1<2) {
header( "Location: ".$fan.""); die();}
else {
header( "Location: ".$nofan); die();}