php3-list | 199901
Date: 01/25/99
- Next message: Paulo Parola: "[PHP3] Bad column offset"
- Previous message: Lutz Krüger: "[PHP3] GD dyn. Image not redrawn"
- In reply to: smindlin <email protected>: "[PHP3] $scalar = include(text.inc)?"
- Next in thread: Tommy Williams: "RE: [PHP3] $scalar = include(text.inc)?"
- Reply: Tommy Williams: "RE: [PHP3] $scalar = include(text.inc)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi!
On 21-Jan-99 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);
> ?>
He-he... Perl-like solution:
$scalar=join("\n",file('text.inc'));
SKiller
--
Virtue does not always demand a heavy sacrifice -- only the willingness
to make it when necessary.
-- Frederick Dunn
--------------------------
Sergei Keler
WebMaster of "ComSet"
E-Mail: skiller <email protected>
http://www.comset.net
--------------------------
--
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>
- Next message: Paulo Parola: "[PHP3] Bad column offset"
- Previous message: Lutz Krüger: "[PHP3] GD dyn. Image not redrawn"
- In reply to: smindlin <email protected>: "[PHP3] $scalar = include(text.inc)?"
- Next in thread: Tommy Williams: "RE: [PHP3] $scalar = include(text.inc)?"
- Reply: Tommy Williams: "RE: [PHP3] $scalar = include(text.inc)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

