Jump to content
php.lv forumi

cookie problem ?


element

Recommended Posts

kaapeec kuukijs netiek nolasiits atkaartoti, kad browseris (gan ie, gan ff) tiek aizveerts ciet un atkal atveerts?

$expire = time()+3600*24*6000; // laiks
$value = "big"; // veertiiba
setcookie("textsize", $value, $expire); //uzstaadam kuukiju.. viss straadaa liidz aizver browseri.. naakoshreiz uzstaadiijumi atkal no jauna jaanoraada

Edited by element
Link to comment
Share on other sites

NU principā, ja viss pārējais ir OK, tad vienīgā problēmā varētu būt - "Headers already sent".. tobiš cookies no PHP netiek ielikts. (Tas ir pie nosacījuma, ja tev display_errors = OFF un tu to erroru neredzi)

Link to comment
Share on other sites

tu gadījumā neuzliec cookie uz kādu noteiktu path? http://lv.php.net/setcookie

 

bool setcookie ( string $name [, string $value [, int $expire [, string $path [, string $domain [, bool $secure [, bool $httponly]]]]]] )

 

path

 

The path on the server in which the cookie will be available on. If set to '/', the cookie will be available within the entire domain. If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain. The default value is the current directory that the cookie is being set in.

Link to comment
Share on other sites

×
×
  • Create New...