我想从这个SQL表中获取landing_page值并将其添加到标头位置
:我在页面顶部获得了以下代码,但这给了我一个空白页面:
<?php
foreach($[user_name] as $user) {
$location="Location:http://".$user['landing_page'];
header($location);
}
?>
<!-- if you need user information, just put them into the $_SESSION variable and output them here -->
Order: <?php echo $_SESSION['user_name']; ?>. You are securely logged in.我哪里错了?


原始代码是一个登录脚本,我试图让用户在登录后使用google.com
发布于 2014-05-20 19:28:41
您没有正确地追加变量。尝试使用,
header('"'.$user['landing_page'].'");发布于 2014-05-20 19:32:30
我认为您可以通过简单地将参数附加到header中来实现这一点
header("Location: " . $user['landing_page']);发布于 2014-05-20 19:33:33
试试这个:
<?php
header("Location: ".$user['landing_page']);
?>https://stackoverflow.com/questions/23758542
复制相似问题