note 74164 added to function.fwrite
| From: | lil_chav_c at hotmail dot om | Date: | Wed, 28 Mar 2007 06:19:54 +0000 |
| Subject: | note 74164 added to function.fwrite | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124874@lists.php.net to get a copy of this message | ||
Here is what i done I can't get fwrite to write a certain line on a certain line.
<?php
$config = 'config.php';
$offline_var = 1;
if (is_writable($config)) {
if (!$handle = fopen($config, 'a')) {
echo "Cannot open file ($config)";
exit;
}
if (fwrite($handle, $offline_var) === FALSE) {
echo "Cannot write to file ($conig)";
exit;
}
echo "Success, wrote ($offline_var) to file ($config)";
fclose($handle);
} else {
echo "The file $config is not writable";
}
?>
----
Server IP: 87.124.64.96
Probable Submitter: 88.104.72.205
----
Manual Page -- http://www.php.net/manual/en/function.fwrite.php
Edit -- https://master.php.net/note/edit/74164
Del: integrated -- https://master.php.net/note/delete/74164/integrated
Del: useless -- https://master.php.net/note/delete/74164/useless
Del: bad code -- https://master.php.net/note/delete/74164/bad+code
Del: spam -- https://master.php.net/note/delete/74164/spam
Del: non-english -- https://master.php.net/note/delete/74164/non-english
Del: in docs -- https://master.php.net/note/delete/74164/in+docs
Del: other reasons-- https://master.php.net/note/delete/74164
Reject -- https://master.php.net/note/reject/74164
Search -- https://master.php.net/manage/user-notes.php