RES: [PHP] include into var

From: Date: Wed, 18 Oct 2000 20:38:56 +0000
Subject: RES: [PHP] include into var
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20975@lists.php.net to get a copy of this message
> > $content = include "file.php"; > > print $content; > > > > It works fine. > > it does, but not for the reasons you think. > > include() returns nothing. it does no good to assign it to a > variable. you could remove the print statement and the output > would be the same. all you need is: > > include("path/to/my/file.php"); > Right, but I really need to catch it in a variable to be used later not to print instantly. I'm trying the ob_ functions which I never used before and works perfectly! See the message from Lars Torben. Regards, Carlos

« previous php.general (#20975) next »