我想獲取從這個SQL表LANDING_PAGE值,並將其添加到文件頭位置正在提取文本值在頭部使用:位置
:Ive得到了下面的代碼在頁面的頂部,但這個給我一個空白頁:
<?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登錄後
如果您的landing_page爲http://如數據庫圖片所示爲什麼要在標頭(「位置」)中添加http://: –
空白頁通常表示PHP錯誤。在頁面開始處添加'ini_set('display_errors',true);'開啓錯誤報告。另外,'$ user_name'對於那個變量來說似乎是一個奇怪的名字,並且foreach在這裏看起來也是錯誤的。 –