Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

Re: [PHP3] $scalar = include(text.inc)? From: webmaster <email protected>
Date: 01/20/99

On 20 Jan, smindlin <email protected> wrote:
> I can't seem to open up a text file and put it's contents into a scalar
> variable. I've searched through the docs..and still..it doesn't seem to
> work.
>
> <?
> $myText = include(text.inc);
> ?>
>
> obviously doesn't work like I want it to. I've tried quotes..and all that
> jazz..and I've attempted most of the other file functions for PHP.
>
> Is there a FILEHANDLER reserve like perl in PHP? There's got to be a way
> to do this. Any suggestions? (Why do I feel like this is a dumb
> question?!)
>
> Thanx.
> -spencer-
> smindlin <email protected>

Have a look at fopen, fread and friends. They should solve your problem.

Cheers

-- 
David Robley

WEBMASTER | Phone +61 8 8374 0970 RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA Visit the PHP mirror at http://au.php.net:81/

-- 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>