<?php
error_reporting(0);
if(isset($_POST['submit'])){
$additionalIDs = array("williamhew","anthon9","geroyi");
$rA = array_rand($additionalIDs,1);
$merchantNick = ".membership.com";
$gen_link = $additionalIDs[$rA].$merchantNick;
header("Location: http://$gen_link");
}
?>
<input type ="submit" name="submit" ></input>
我不知道爲什麼它不會重新定向後,我點擊提交。這段代碼有什麼不妥? 我需要你們的幫助:(PHP沒有重定向後subminision
編輯:
使用,這也不能重定向,
<?php
error_reporting(E_ALL);
if(isset($_POST['submit'])){
ob_start();
header("Location: http://www.facebook.com");
exit;
}
試圖標題( 「位置:http://」。$ gen_link); ? – 2014-12-19 08:12:24
@MarcoMura,我已經試過它,即使與http://www.facebook.com也無法正常工作。 – FreedomPride 2014-12-19 08:13:01
您的提交元素不在表單標籤中。 – 2014-12-19 08:14:49