复制代码 代码如下:
Warning: Cannot modify header information – headers already sent by (output started at C:/xampp/htdocs/b.php:2) in … on line …
复制代码 代码如下:
<?php
setcookie("page", "a.php");
$page = $_COOKIE["page"] ? $_COOKIE["page"] : "unknown";
echo "From " . $page . "<br /><br />";
?>
This is a.php. Go to <a href="b.php">b.php</a>
复制代码 代码如下:
<?php
setcookie("page", "b.php");
$page = isset($_COOKIE["page"]) ? $_COOKIE["page"] : "unknown";
echo "From " . $page . "<br /><br />";
?>
This is b.php. Go to <a href="a.php">a.php</a>
新闻热点
疑难解答