On Mon, 27 Jan 2003, Guru Geek wrote: > Sorry, here is the code now ( I need a nap ) > > $filename > ="/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; > $handle = fopen ($filename, "r"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo $contents; > exit;
For something like this, just use readfile() and not fread as it'd be much more efficient if you don't actually manipulate the string $contents. So: readfile($filename); // note: do not use echo Also, what is your include_path setting? It's important you know it and what it means as that'll answer the question in your last post: print ini_get('include_path'); http://www.php.net/manual/configuration.directives.php#ini.include-path Also, no need for "exit" here as that happens automatically. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php