Re: CAN NOT read qmail

From: Date: Thu, 17 Apr 2008 16:24:20 +0000
Subject: Re: CAN NOT read qmail
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-273192@lists.php.net to get a copy of this message
I try your code; It is great. But I get "faile". It means I can not open the file, which is from qmail. It may be different format of qmail???? I get below from code failed for 1208434346177.9690.domain.com code------------------------------- <?php $file = "1208434346177.9690.domain.com"; $fp = fopen($file, "r"); echo "hello"; if($fp){ while(!feof($fp)) { $data = fgets($fp, 1024); echo "$data <br>"; } }else{ die("fopen failed for $file"); } ?> --------------------------------------------------------- If you know how to read qmail, please. Regards, Yui 2008/4/18, Jay Blanchard <jblanchard@pocket.com>: > [snip] > > I do not get it. > I do not where code has basic mistake. > > [/snip] > > And that is why putting in basic error checking will help, for instance; > > $fp = fopen($file, "r"); > if($fp){ > > while(!feof($fp)) { > $data = fgets($fp, 1024); > echo "$data <br>"; > } > > } else { > die("fopen failed for $file") > } > > Please spend some time reading the manual and getting the basics down. >

« previous php.general (#273192) next »