note 91292 added to function.fwrite
| From: | oktavianus dot programmer at gmail dot com | Date: | Thu, 04 Jun 2009 03:51:55 +0000 |
| Subject: | note 91292 added to function.fwrite | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156345@lists.php.net to get a copy of this message | ||
this the another sample to use fwrite with create a folder and create the txt file.
<?php
$mypath="testdir\\subdir\\test";
mkdir($mypath,0777,TRUE);
$filename = $mypath.'\test.txt';
$handle = fopen($filename,"x+");
$somecontent = "Add this to the file Oktavianus";
fwrite($handle,$somecontent);
echo "Success";
fclose($handle);
?>
please try...
Oktavianus
----
Server IP: 202.158.52.162
Probable Submitter: 203.210.80.138
----
Manual Page -- http://www.php.net/manual/en/function.fwrite.php
Edit -- https://master.php.net/note/edit/91292
Del: integrated -- https://master.php.net/note/delete/91292/integrated
Del: useless -- https://master.php.net/note/delete/91292/useless
Del: bad code -- https://master.php.net/note/delete/91292/bad+code
Del: spam -- https://master.php.net/note/delete/91292/spam
Del: non-english -- https://master.php.net/note/delete/91292/non-english
Del: in docs -- https://master.php.net/note/delete/91292/in+docs
Del: other reasons-- https://master.php.net/note/delete/91292
Reject -- https://master.php.net/note/reject/91292
Search -- https://master.php.net/manage/user-notes.php