Re: What's wrong with this code?
| From: | Alexander Wagner | Date: | Mon, 23 Apr 2001 06:59:41 +0000 |
| Subject: | Re: What's wrong with this code? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49812@lists.php.net to get a copy of this message | ||
Tyler Longren wrote:
> $file = fopen("includes/about.inc", "r");
> $data = fread($file, 24000000);
[..]
> Any ideas why that doesn't work on one server but it will work on
> another server? The server it works on is Win2k, IIS5, php4.0.4pl1.
> The server it doesn't work on is Linux, Apache, php4.0.4pl1. Any
> ideas why this won't work? Just to be sure, I did a chmod 777
> about.inc, so file permissions isn't it.
I don't know why this wouldn't work on LAMP, but if you want to read a
whole file you should do this:
$data = implode('',file("includes/about.inc"));
regards
Wagner
--
"In place of infinity we usually put some really big number, like 15."
- Anonymous Computer Science professor