【发布时间】:2012-09-11 19:16:54
【问题描述】:
所以...如果您有一个说明类似内容的脚本...
while($result = mysql_fetch_array($resource))
{
if($result['TITLE'] == $this->title)
{
header("LOCATION: profile.php?error=11");
}
echo 'testing';
}
//Create the database profile
$second_query = "INSERT INTO profiles(USER_ID, KEYWORDS, TITLE, INTRO) ";
$second_query .= "VALUES(".$this->userId.",'".serialize($this->keywords)."','".$this->title."','".$this->intro."')";
echo $second_query;
if($result = mysql_query($second_query))
{
if(isset($file))
{
$this->update_profile($this->files);
}
return true;
}else
{
return false;
}
并且第一个条件失败并将标头发送回...如果您在发送标头后不返回false,它会继续运行脚本吗?我有一个问题,如果在我的数据库中找到标题,它将返回错误,但它会继续运行该脚本,从而将重复的标题条目插入到我的数据库中。
再说一遍……即使您发送了标头,脚本还会继续执行吗?又名(在这种情况下)重定向?
【问题讨论】:
标签: php header buffer ob-start