editing textfile
| From: | Patrick | Date: | Thu, 23 Jan 2003 15:50:20 +0000 |
| Subject: | editing textfile | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-132847@lists.php.net to get a copy of this message | ||
Hi,
i got a textfile and i want to edit one post in it.
here is what i use to read the file
$fp = fopen($servername, "r") or die("error");
$wuser = file($servername);
$num = -1;
for ($i=0; $i < count($wuser); $i++) {
$wtemp = explode(";;", $wuser[$i]);
if ($ausername == $wtemp[0]) {
$wserver = explode(";;", $wuser[$i]);
}
}
fclose($fp);
then the user will do some inputs on a form and submit em back,
and i want to save em back to the database, how do i alter/delete just one
post in a textfile?
regards
patrick