On 19/04/02, "Giovanni Lenzi" <[EMAIL PROTECTED]> wrote:
> Fatal error: Call to undefined function: file_get_contents() in
> /usr/home/s/a/sauzer/public_html/sfidario/readstreams/1.0/warsupcoming.php
> on line 17
file_get_contents is only in the current CVS (development) version of PHP.
> So i have to create myself this function.
>
> Can anyone help me please??
> Does anyone have the full source code of this function??
in your PHP script:
function file_get_contents($filename) {
$fp = fopen($filename, "rb");
if (!is_resource($fp))
return false;
$data = fread($fp, filesize($filename));
fclose($fp);
return $data;
}
In the future, please read the manual on php.net, as there are examples
in the user-contributed notes for this and similar functions (like file()),
that will help you.
This mailing list of the for development of PHP, not for writing scripts
with PHP: you would be better off with php-users or php-general or something
like that.
--Wez.
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php