I'd like to say something about the session.

Source: Internet
Author: User
Tags php file linux
Session in WIN32, I do not know why PHP4 processing absolute path is always problematic. Focus on the Extension_dir, Upload_tmp_dir and Session.save_path settings, no matter how you set it up, and then I set it./, so I can.
But the problem comes again. Session.save_path This path corresponds to the currently executing PHP file, so when you use session, if you change to another directory, then the session is gone.
Of course, these do not exist under Linux. Because Linux, can use/tmp.

So for this brother's question, I think I can do that. First, look at your PHP. INI content, Session.save_path should be changed to./. Then, there are some questions about your program, and I added some notes. You can try again.

<?php
Session_register ("abc"); You should assign a value to a variable before you perform some functions
$ABC = "ABCDEFG"; That means the sentence should be put in the front.
Header ("Location:go.php");

?>
//////////////////////////////////////////
go.php

<?php
Session_register ("abc"); This sentence is not necessary.
echo "You are". $abc. " \ n ";
?>



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.