RE: [PHP] CAN NOT read qmail
| From: | Jay Blanchard | Date: | Thu, 17 Apr 2008 15:21:38 +0000 |
| Subject: | RE: [PHP] CAN NOT read qmail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-273184@lists.php.net to get a copy of this message | ||
[snip]
I have a question about read to qmail.
I try to read qmail using php. But I can not
read it.
the code is below-------------------------
<?php
$file="213434534.domain.com";
$fp = fopen($file, "r");
while(!feof($fp)) {
$data = fgets($fp, 1024);
echo "$data <br>";
}
fclose($fp);
---------------------------------------------
[/snip]
Insert some basic error checking code to see if you successfully opened
the file, etc. That'll point you in the right direction.