Please read this
Done.
Thanks Qiang, but, are you considering the fact that the httponly flag appeared until PHP 5.2? I guess a PHP version check is necessary or PHP 5.1 will throw an error (please see my post here and please correct me if I’m wrong).
Also, there's another [tt]addCookie[/tt] in [tt]yiilite.php[/tt], line 2069…
passing an extra parameter to a function won't cause problem. That's why I skipped the php version check.
Quote
hmmmm…
<?php $name = 'x'; $value = 'y'; $expire = time(); $path = '/'; $domain = 'test.com'; $secure = false; $httponly = true; $something = 'xyz'; setcookie($name,$value,$expire,$path,$domain,$secure,$httponly,$something); ?>
shows a warning:
[tt]Warning: setcookie() expects at most 7 parameters, 8 given in /path/to/test.php on line 3[/tt]
with my PHP 5.2.6 ([tt]error_reporting = E_ALL & ~E_NOTICE[/tt]). I don't know if PHP 5.1 just ignores an extra parameter without warning, can someone confirm?
Ok, i fixed this. Thanks!