I'm not familiar with PHP 3 stuff but try

echo "start";
$fpLog = fopen
("/usr/home/aurica/aurica.com/cannesEmail/emailblastSendLog.txt","a");

if (!$fpLOG) {
die ("Could not open file");
}

if (flock ($fpLog, 2) ) {
         $strFileLog = "Manisha Test";
         fwrite($fpLog,$strFileLog);
}
flock ($fpLog, 3);
fclose ($fpLog);
echo "close ok ";

This would check the file has opened OK and a failure at this stage would
probably cause your error.
Can't think of anything else - sorry!


"Manisha" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I open a file in append mode, I locked it and write the data.
> But when I try to unlock or close it then I get warning
>
> Warning: Unable to find file identifier 12 in www/htdocs/testfclose.php3
on
> line 9
>
> Warning: Unable to find file identifier 12 in  www/htdocs/testfclose.php3
> on line 10
> close ok
>
> I am using PHP3 - code
> ------------------------------------------------
> echo "start";
> $fpLog = fopen
> ("/usr/home/aurica/aurica.com/cannesEmail/emailblastSendLog.txt","a");
>
> if (flock ($fpLog, 2) ) {
>          $strFileLog = "Manisha Test";
>          $fpLog = fwrite("$fpLog",$strFileLog);
> }
> $tmp = flock ($fpLog, 3);
> fclose ($fpLog);
> echo "close ok ";
> ------------------------------------------------
>
> What's wrong ?
>
> Thanks in advance,
> Manisha





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

Reply via email to