标头位置在实时上不起作用,但在本地主机中工作


header location not working on live but working in localhost

include "include/connection.php";
$date= date("Y-m-d H:i:s");
$profile_comment="INSERT INTO `infotown_test`.`profile_comments` (`id`, `user_id`, `name`, `email`, `comments`, `date_and_time`) VALUES (NULL, '".$_REQUEST['user_id']."', '".$_REQUEST['name']."', '".$_REQUEST['email']."', '".$_REQUEST['comment']."', '".$date."')";
mysql_query($profile_comment);
header("location:company-profile.php?id=2");(why it's not working?)

将"位置"大写为"位置",

header("Location:company-profile.php?id=2");