RE: [PHP] include-problem

From: Date: Tue, 02 Dec 2003 10:18:04 +0000
Subject: RE: [PHP] include-problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171553@lists.php.net to get a copy of this message
On maandag 1 december 2003 15:23 Rasmus Lerdorf told the butterflies: > On Mon, 1 Dec 2003, Wouter van Vliet wrote: > > <?php > > print "!!!"; > > ob_start(); > > include 'http://server.com/test/echo.php'; > > $XML = ob_get_clean(); // or use ob_get_contents(); and > > ob_end_clean() for PHP < 4.3 print "???"; > > > > print '[Between this you'll get your XYZ]'; print $XML; print > > '[Between this you'll get your XYZ]'; ?> > > Or just use file_get_contents() which would be more efficient > than using output buffering for this. > > -Rasmus yes, probably. But isn't file_get_contents(); only implemented from php4.3 .. might wanna try join('', file()); or $fd = fopen($FileName, 'r'); fread($fd, filesize($fd)); if you're running an older version. -me.

« previous php.general (#171553) next »