Page 1 of 1

var include file

Posted: Fri Jul 23, 2004 10:28 am
by pppswing
Hello,

I need to put the content of a file in a variable. How can I do that ?
I mean better than this :
їphp]
$handle = fopen($topmenufile, "r");
$topmenu = fread($handle, filesize($topmenufile));
fclose($handle);
ї/php]
Thanks, :)

?>

Posted: Fri Jul 23, 2004 11:55 am
by feyd
[php_man]file_get_contents[/php_man]() or [php_man]file[/php_man]().