|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-02-15 23:18 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 14:00:01 2025 UTC |
Description: ------------ When we set a cookie with the function setcookie() and when the cookie name have spaces " " or points ".", these characters are replaced by underscures '_'. I think that can be fix by urlencodind points (%2E) and spaces (%20). Reproduce code: --------------- <?php setcookie('cookie_name.with spaces', 'value', time()+10000); ?> <pre><?php print_r($_COOKIE); ?></pre> <a href='#'>Reload</a> Expected result: ---------------- =========== First time: =========== Array ( ) Reload ============ Second time: ============ Array ( [cookie_name.with spaces] => value ) Reload Actual result: -------------- =========== First time: =========== Array ( ) Reload ============ Second time: ============ Array ( [cookie_name_with_spaces] => value ) Reload