cookie_urlencode.php 242 B

123456789101112
  1. <?php
  2. use Symfony\Component\HttpFoundation\Cookie;
  3. $r = require __DIR__.'/common.inc';
  4. $str = '?*():@&+$/%#[]';
  5. $r->headers->setCookie(new Cookie($str, $str, 0, '', null, false, false));
  6. $r->sendHeaders();
  7. setcookie($str, $str, 0, '/');