Php variable transfer

Source: Internet
Author: User
Php variable transfer help? Excuse me, & nbsp; I have created a public file for saving information & nbsp; conn. php $ isLog & nbsp; true; I want. in php, set $ isLog & nbsp; false; but in B. query $ isLog or true in php. can you tell me if & nbsp; doesn't understand & nbsp; --- php variable transfer for help?
I have created a public file to save the information conn. php.

$ IsLog = true;

I want to set $ isLog to false in a. php;

However, I query $ isLog or true in B. php.


Is it true?
------ Solution --------------------
To achieve the desired effect, use session storage.
------ Solution --------------------
$ IsLog = true in the conn. php file;

You reference conn. php in a. php and change the value to false, but the value of the conn. php file does not change.
The value obtained when you rereference conn. php in B. php is true.

To achieve your effect, you can use get to pass and session.
------ Solution --------------------
If you want to change the value of the loaded variable on the page, you only need to rewrite the variable on the current page. pay attention to loading the page and rewriting the variable order.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.