Re: output of fread() is blank - FIXED - updated
| From: | Guru Geek | Date: | Tue, 28 Jan 2003 00:13:52 +0000 |
| Subject: | Re: output of fread() is blank - FIXED - updated | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133323@lists.php.net to get a copy of this message | ||
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;
Guru Geek wrote:
> Here's my code now:
>
> $filename =
> "/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt";
> $handle = fopen ($filename, "r");
> $contents = fread ($handle, filesize ($filename));
> fclose ($handle);
> echo readfile($filename);
> exit;
>
> now it displays the contents of the text.txt file. I originally had just
> /include/text.txt but it told me no such file existed. But once I added the
> root directory stuff in front of that, it works.
>
> I'm having a similar problem getting smarty to run, it keeps telling me that
> it can't find index.tpl and now I think I know what the problem is...
>
> Thanks to everyone!!!!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php