1. Configure PHP.ini, modify Session.save_path
such as: Session.save_path = d:/developer/php/temp OR/tmp
2. Procedures
1.php
Session_Start ();
$var 1 = "Test";
Session_register ("var1");
?>
2.php
Session_Start ();
echo $var 1;
?>
First run 1.php, then run 2.php, the page should appear test
Session "headers already sent" error issue
Error HINT: Cannot send session cookie-headers already sent by ...
The error that occurs is session_start () in the page, and an output statement exists before the statement
The following example:
Session_Start ();
$var 1 = "Test";
Session_register ("var1");
?>
WillPut it in the back.
File Upload
Modify PHP.ini
Upload_tmp_dir=d:/temp OR/tmp
upload.php
====================================
<title>PHP Upload</title>
if ($upload) {
$real _path = $userfile _name;
if (file_exists ($real _path)) {
Unlink ($real _path);
}
if (! @copy ($userfile, $real _path))
$upload _flag = false;
Else
$upload _flag = true;
}
?>
http://www.bkjia.com/PHPjc/632408.html www.bkjia.com true http://www.bkjia.com/PHPjc/632408.html techarticle 1. Configure php.ini, modify Session.save_path such as: Session.save_path = d:/developer/php/temp or/tmp 2. Program 1.php? Session_Start (); $ var1 = "Test"; Session_register ("var1");? 2.ph ...