cookie_page3.php 354 B

12345678910111213141516
  1. <?php
  2. $hasCookie = isset($_COOKIE['foo']);
  3. setcookie('foo', 'bar', 0, '/', null, false, true);
  4. ?>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <title>HttpOnly Cookie Test</title>
  9. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
  10. </head>
  11. <body>
  12. <div id="cookie-status">Has Cookie: <?php echo json_encode($hasCookie) ?></div>
  13. </body>
  14. </html>