Manage your message in the text file implementation is not as convenient as the database, below we want to achieve this effect!
In the output when we are using an array to save the data, then we will be very convenient for each set of data in order to assign a sequence number, by this sequence number to operate, we can easily modify the data!
$date [0] is the first line in a text file, and we output with an assigned ordinal of 0.
The output has this effect:
Modify Message
We re-customize modify.php
if ($id! = "") {
$date =file ("Txt/mytxt.txt");
$str =explode ("&", $date [0])
?>
}else{
$str = $tech 1. " & ". $tech 2. "&". $tech 3 ....
If ($str! = "") {
Write the modified data back to the text file!
}
}?>
In this process to keep in mind that the value of the $id is not lost, when the data is written back to the text in the value of the first reading into the second, then $date[$id]= $str;
$FP =fopen ("Txt/mytxt.txt", "w");
Fwrite ($fp, $date);
Fclose ($FP);
http://www.bkjia.com/PHPjc/532134.html www.bkjia.com true http://www.bkjia.com/PHPjc/532134.html techarticle Manage your message in the text file implementation is not as convenient as the database, below we want to achieve this effect! In the output we are using arrays to save the data, then I ...