The session in PHP cannot be transferred across pages? A cross page is lost. it is blank! The last part of this post is edited by MoreQuestion from 2011-03-. for example, first browse the. php file and write a session value in it. Then, browse B. php to get that the session in a PHP cannot be passed across pages? A cross page is lost. it is blank!
This post was last edited by MoreQuestion at 07:57:23. for example, first browse the. php file and write a session value in it.
Then browse B. php to get the session value written by a. php. Empty!
Why? The test is normal on the local machine. The upload server is complete.
Session information of PHPINFO
Session. save_path D:/hosting/user/html/temp
This folder is readable and writable.
When you browse the. php page, a large file is generated and the session value is saved.
When you browse the B. php page, a file of 0 size is generated. Not available? Why?
session
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary wddx
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 4 4
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path D:/hosting/user/html/temp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 1 1
A. php
session_start();
?>
session set
$_SESSION['session_value'] = 'value';
var_dump($_SESSION);
phpinfo();
?>
The file is normal and the session value can be printed.
B. php
session_start();
?>