Re: CAN NOT read qmail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>:
> [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.
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux