PHP中的session不能跨页传递?一跨页就丢失,为空的!
<br /> session<br /> Session Support enabled <br /> Registered save handlers files user <br /> Registered serializer handlers php php_binary wddx <br /> <br /> Directive Local Value Master Value <br /> session.auto_start Off Off <br /> session.bug_compat_42 On On <br /> session.bug_compat_warn On On <br /> session.cache_expire 180 180 <br /> session.cache_limiter nocache nocache <br /> session.cookie_domain no value no value <br /> session.cookie_httponly Off Off <br /> session.cookie_lifetime 0 0 <br /> session.cookie_path / / <br /> session.cookie_secure Off Off <br /> session.entropy_file no value no value <br /> session.entropy_length 0 0 <br /> session.gc_divisor 100 100 <br /> session.gc_maxlifetime 1440 1440 <br /> session.gc_probability 1 1 <br /> session.hash_bits_per_character 4 4 <br /> session.hash_function 0 0 <br /> session.name PHPSESSID PHPSESSID <br /> session.referer_check no value no value <br /> session.save_handler files files <br /> session.save_path D:/hosting/user/html/temp <br /> session.serialize_handler php php <br /> session.use_cookies On On <br /> session.use_only_cookies Off Off <br /> session.use_trans_sid 1 1 <br /> <br />
<?php<br /> session_start();<br /> ?><br /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br /> <html xmlns="http://www.w3.org/1999/xhtml"><br /> <head><br /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br /> <title>session set</title><br /> </head><br /> <br /> <body><br /> <?php<br /> $_SESSION['session_value'] = 'value';<br /> var_dump($_SESSION);<br /> phpinfo();<br /> ?><br /> </body><br /> </html>
<?php <br /> session_start();<br> ?><br> nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <div class="clear"> </div>