note 90751 added to function.file-put-contents
| From: | perberos at NOSPAM dot gmail dot com | Date: | Fri, 08 May 2009 02:01:47 +0000 |
| Subject: | note 90751 added to function.file-put-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154339@lists.php.net to get a copy of this message | ||
lazy mode
<?php
if (!function_exists('file_get_contents')): function file_get_contents($filename)
{
$f = fopen($filename, 'r');
$content = '';
while (!feof($f))
$content .= fread($f, 1024);
fclose($f);
return $content;
} endif;
if (!function_exists('file_put_contents')): function file_put_contents($filename,
$content)
{
$f = fopen($filename, 'w');
fputs($f, $content);
ftruncate($f, ftell($f));
fclose($f);
} endif;
?>
----
Server IP: 190.2.55.64
Probable Submitter: 190.49.22.130
----
Manual Page -- http://www.php.net/manual/en/function.file-put-contents.php
Edit -- https://master.php.net/note/edit/90751
Del: integrated -- https://master.php.net/note/delete/90751/integrated
Del: useless -- https://master.php.net/note/delete/90751/useless
Del: bad code -- https://master.php.net/note/delete/90751/bad+code
Del: spam -- https://master.php.net/note/delete/90751/spam
Del: non-english -- https://master.php.net/note/delete/90751/non-english
Del: in docs -- https://master.php.net/note/delete/90751/in+docs
Del: other reasons-- https://master.php.net/note/delete/90751
Reject -- https://master.php.net/note/reject/90751
Search -- https://master.php.net/manage/user-notes.php