How to open session in Dedecms V5.7

little bottle
Release: 2023-04-06 07:14:02
forward
2237 people have browsed it

This article mainly talks about the use of session in Dedecms. Friends who are interested can come and learn about it.

When using session in dedecmsv5.7, please pay attention to how to open it! It’s different from how it’s used in the PHP source code! ! !

Open the session,must be preceded by @

@session_start();

Start the session, must be preceded by @, Otherwise, it will not be recognized in dedecms.

The difference here is that it is different from the PHP source code.The PHP source code puts this sentence at the front because the previous code is not allowed to be executed.

But in dedecms, if you put this sentence at the front of the page,Where there is verification code verification, a verification code error will appear,

So in dedcms, you can just open it wherever session storage is used.

After opening, the use will be the same as in the PHP source code

@session_start(); $_SESSION['test'] = "123";
Copy after login

Related tutorials:DedeCMS video tutorial


The above is the detailed content of How to open session in Dedecms V5.7. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
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
Latest Articles by Author
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!