note 38055 added to function.file-put-contents
| From: | Andre at rn2 dot php dot net | Date: | Sat, 06 Dec 2003 12:33:44 +0000 |
| Subject: | note 38055 added to function.file-put-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61477@lists.php.net to get a copy of this message | ||
I think this is very the same:
<?php
if (!function_exists('file_put_contents')) {
if (!defined('FILE_APPEND')) {
define('FILE_APPEND', 8);
}
if (!defined('FILE_USE_INCLUDE_PATH')) {
define('FILE_USE_INCLUDE_PATH', 1);
}
function file_put_contents($filename, $data, $flags = 0) {
$mode = $flags & FILE_APPEND ? 'ab' : 'wb';
$fh = fopen($filename, $mode, $flags & FILE_USE_INCLUDE_PATH);
$bytes_written = fwrite($fh, $data);
fclose($fh);
return $bytes_written;
}
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.file-put-contents.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38055
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38055&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38055&report=yes
Search -- http://master.php.net/manage/user-notes.php