I thought this would be fairly easy, but, I can't figure out how to load the contents of a file into a variable so I can output it later.
The file to be loaded is in my include_path on the server and does contain some HTML. file_get_contents() is exactly what I need, but, it only works on a CVS version of PHP, whatever that is. I also tried the following function: function file_get_contents($filename) { $fd = fopen ($filename, "r", 1); $contents = fread($fd, filesize($filename)); fclose($fd); return $contents; } But it returns nothing. If I use readfile() the file contents is displayed, but, what I really want to do is store it in a string variable, not output it directly. How can I do this? Thanks, Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php