Witam na wstępie chce zaznaczyć ze mam bardzo skromna wiedzę dlatego proszę o rozbudowaną odpowiedź (jak krowie na rowie) a mianowicie mam pytanie co dodać w tym pliku:
aby zmienić w utworzonym pliku cookie te argumenty:
Wystarczy zerknąć do dokumentacji, aby poznać odpowiedź.
Hm okej tylko gdy zapisuje tak:to nie tworzy mi żadnego pliku cookie:
Co robię źle?
Patrz na swój kod a na adres strony gdzie wchodzisz....
http://php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-parameters
To moze inaczej co musze wpisac w setcookie(...) aby zmienić host
Co prawda nigdy się w to nie bawiłem, ale wydaje mi się, że od tego jest parametr domain.
Jak mówi dokumentacja:
The (sub)domain that the cookie is available to. Setting this to a subdomain (such as 'www.example.com') will make the cookie available to that subdomain and all other sub-domains of it (i.e. w2.www.example.com). To make the cookie available to the whole domain (including all subdomains of it), simply set the value to the domain name ('example.com', in this case). Older browsers still implementing the deprecated » RFC 2109 may require a leading . to match all subdomains.
The (sub)domain that the cookie is available to. Setting this to a subdomain (such as 'www.example.com') will make the cookie available to that subdomain and all other sub-domains of it (i.e. w2.www.example.com). To make the cookie available to the whole domain (including all subdomains of it), simply set the value to the domain name ('example.com', in this case).
Older browsers still implementing the deprecated » RFC 2109 may require a leading . to match all subdomains.
93,729 zapytań
142,668 odpowiedzi
323,283 komentarzy
63,288 pasjonatów
Motyw:
Pajacyk od wielu lat dożywia dzieci. Pomóż klikając w zielony brzuszek na stronie. Dziękujemy! ♡
Oto polecana książka warta uwagi.Pełną listę książek znajdziesz tutaj
Aby uzyskać rabat -10%, użyjcie kodu pasja-linux, wpisując go w specjalne pole w koszyku.