<?phpfunction callback($buffer) { // replace all the apples with oranges return (str_replace("apples", "oranges", $buffer)); }ob_start("callback");?><html> <body> <p>It's like comparing apples to oranges. </body> </html><?phpob_end_flush();?>
function Another($buffer) { if ($HTTP_POST_VARS["processNextItem"]=="addAnother") {header("Location: newItem.php?mode=new&name="); } else if ($HTTP_POST_VARS["processNextItem"]=="editAnother") { header("Location: ".$PREVPAGE_session.".php"); } } 这个函数执行时什么都不做 因为$HTTP_POST_VARS不是自动全局变量,在函数内为空。 所用的条件都不能满足
{
// replace all the apples with oranges
return (str_replace("apples", "oranges", $buffer));
}ob_start("callback");?><html>
<body>
<p>It's like comparing apples to oranges.
</body>
</html><?phpob_end_flush();?>
{
if ($HTTP_POST_VARS["processNextItem"]=="addAnother")
{header("Location: newItem.php?mode=new&name=");
}
else
if ($HTTP_POST_VARS["processNextItem"]=="editAnother")
{
header("Location: ".$PREVPAGE_session.".php");
}
}
这个函数执行时什么都不做
因为$HTTP_POST_VARS不是自动全局变量,在函数内为空。
所用的条件都不能满足