Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

RE: [PHP3] $scalar = include(text.inc)? From: Brian Schaffner (BSchaffner <email protected>)
Date: 01/25/99

funtion Read_File($filename) {
        $buf = False;
        $fp =  <email protected>($filename, "r");
        if ($fp > 0) {
                $buf = fread($fp, filesize($filename));
                fclose($fp);
        }
        return $buf;
}

> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus <email protected>]
> Sent: Monday, January 25, 1999 12:26 PM
> To: Peter van Dijk
> Cc: php3 <email protected>
> Subject: Re: [PHP3] $scalar = include(text.inc)?
>
>
> > readfile reads from a file and outputs to STDOUT. Not quite
> what we want.
>
> fread()
>
> There is a full example in the docs that shows how to use it
> to read the
> entire contents of a file into a variable.
>
> -Rasmus
>
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest list: php3-digest-subscribe <email protected>
> For help: php3-help <email protected> Archive:
> http://www.php.net/mailsearch.php3
> List administrator:
> zeev-list-admin <email protected>
>
>

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>