PHP标头不重定向,主机问题或代码?

时间:2016-04-29 09:59:29

标签: php redirect header echo

之前我使用过其他主机并且代码工作了......但是现在它在新的主机中不起作用了?什么不让它读取标题?

if(isset($_REQUEST['u_submit'])){
  extract($_REQUEST);
  $u_title = htmlentities($_REQUEST['u_title'], ENT_QUOTES);
  $u_description = htmlentities($_REQUEST['u_description'], ENT_QUOTES);
  $u_des2 = mysql_real_escape_string($_REQUEST['u_des2']);
  mysql_query("UPDATE funn SET category='$u_category', ac1='$u_ac1', ac2='po', ac3='po', lchanged='$name', imglink='$u_imglink', title='$u_title', description='$u_description', des2='$u_des2', published='$u_published' WHERE id='$u_id'") or die("Your data cannot update".mysql_error());
   echo "<a href='home.php'><span style='color: green; font-weight: 900;'><img src='img/done.png' valign='middle' height='35' width='auto' style='margin-left: 35px;'> Ndryshimet u ruajtën me sukses!</span></a>";
   header('Location: home.php');
   exit;
}

服务器完美地读取了这个:

echo "<a href='home.php'><span style='color: green; font-weight: 900;'><img src='img/done.png' valign='middle' height='35' width='auto' style='margin-left: 35px;'> Ndryshimet u ruajtën me sukses!</span></a>";

但这不是吗?为什么呢?

header('Location: home.php');

还读到了这个吗?跆拳道?

exit;

服务器如何跳过标题?它是在echo和退出的中间???我真的很困惑,请帮帮我......谢谢:(

0 个答案:

没有答案