note 95529 added to function.fopen
| From: | sumansjournal at rediffmail dot com | Date: | Thu, 07 Jan 2010 12:01:31 +0000 |
| Subject: | note 95529 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164734@lists.php.net to get a copy of this message | ||
I am trying to write at opened file Inside other codes or texts..
$fp = fopen ($loc, "w+");
if (is_writable($loc)){
fwrite ($fp,$updateduser);
fclose ($fp);
BUT THE above code writes below of all texts. And I want to update different parts of that file
inside the other texts or codes ..
I also used the below code to get content of a file but the problem comes that I am unable to get
Perfect values from diiferent areas after wrinting in it ......
$file=file_get_contents($loc);
$data=explode("<!--data-->", $file);
$print=array_slice($data, 1);
But I am not perfectly succesful to UPDATE contents of diiffrent parts of a file..
So Please will anyone help me .... ?? Please Reply at sumansjournal@rediffmail.com . Thank you.
----
Server IP: 69.147.83.197
Probable Submitter: 124.124.161.216
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit -- https://master.php.net/note/edit/95529
Del: integrated -- https://master.php.net/note/delete/95529/integrated
Del: useless -- https://master.php.net/note/delete/95529/useless
Del: bad code -- https://master.php.net/note/delete/95529/bad+code
Del: spam -- https://master.php.net/note/delete/95529/spam
Del: non-english -- https://master.php.net/note/delete/95529/non-english
Del: in docs -- https://master.php.net/note/delete/95529/in+docs
Del: other reasons-- https://master.php.net/note/delete/95529
Reject -- https://master.php.net/note/reject/95529
Search -- https://master.php.net/manage/user-notes.php