search
HomeBackend DevelopmentPHP ProblemWhat to do if php cookie is lost

What to do if php cookie is lost

Oct 16, 2020 am 09:29 AM
cookiephp

php The cookie is lost because the expiration time is not set. The expiration time is the unix timestamp, and the setting statement is "setcookie('name', 'value', time() 3600);".

What to do if php cookie is lost

Recommended: "PHP Video Tutorial"

Specific questions:

I have a page jump now

setcookie(“name1”,value1);
setcookie(“name2”,value2);
header(“Location:http:192.168.1.118/b2b2c/qingdao/login);

The problem now is that the value in the cookie cannot be obtained after the jump. May I ask what is the question? Please help experts.

The screen I want to jump to now is a screen in another project.

Solution:

The expiration time is not set, the expiration time is the unix timestamp

~
eg:

setcookie('name', 'value', time()+3600); //一小时

The above is the detailed content of What to do if php cookie is lost. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.