Home > Backend Development > PHP Tutorial > Why does O_RDWRfailed appear when php4 uses session? _PHP Tutorial

Why does O_RDWRfailed appear when php4 uses session? _PHP Tutorial

WBOY
Release: 2016-07-13 17:32:08
Original
1015 people have browsed it


 php (as the current mainstream development language) The session function in 4 can be said to be quite perfect. It has corrected many bugs in previous versions and is very convenient to use. The difference from the session in asp is that php (as the current mainstream development language)4 stores the session value in the web server, not the client. Generally speaking, it is in the mp directory. If this directory does not exist, the following error will occur:
 Warning: open( mpsess_3a1118cbf345a4950254946fc8e5935e, O_RDWR) failed: m (2)
 Can be found in php( As the current mainstream development language) add this directory to the running directory.
 You can also modify php(as the current mainstream development language).ini file under [session]: session.save_path =
By adding session_save_path( "");You can also specify a path.
 Then you can perform session operations such as:
(as the current mainstream development language)
session_save_path("temp");
session_start(); asd!=""){
session_register("asd");}
if(($pwd!=$asd)&&($pwd!="")){$asd=$ pwd;}
 ?>
 The above saves $asd in the directory temp specified in the session and uses $asd=$pwd to change the value of $asd in the session. The definition of session can only be done before. The use of session variables is not subject to this restriction, but it must be defined first and then used.


http://www.bkjia.com/PHPjc/508874.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508874.htmlTechArticlephp (as the current mainstream development language) The session function in php 4 can be said to be quite perfect, and it has improved the previous There are many bugs in the version, but it is also very convenient to apply. The difference from session in asp is...
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template