Welcome Guest, Not a member yet? Register   Sign In
fwrite() being screwy
#1

[eluser]nZac[/eluser]
Heres an iteresting one for you, here is the code:


Code:
$msg = 'TEST';
$fp = fopen('./logs/somefile.php','ab');

flock($fp, LOCK_EX);    
fwrite($fp, $msg);
flock($fp, LOCK_UN);
fclose($fp);

within the file the output is this:

TESTTEST

I did a little research and found this is a known bug. Anyone know how to get past it?


Messages In This Thread
fwrite() being screwy - by El Forum - 02-20-2010, 02:37 PM
fwrite() being screwy - by El Forum - 02-20-2010, 06:14 PM
fwrite() being screwy - by El Forum - 02-20-2010, 10:04 PM
fwrite() being screwy - by El Forum - 02-21-2010, 12:16 PM
fwrite() being screwy - by El Forum - 02-21-2010, 01:58 PM
fwrite() being screwy - by El Forum - 02-21-2010, 06:11 PM
fwrite() being screwy - by El Forum - 02-21-2010, 06:25 PM
fwrite() being screwy - by El Forum - 02-21-2010, 11:05 PM
fwrite() being screwy - by El Forum - 02-21-2010, 11:14 PM
fwrite() being screwy - by El Forum - 02-21-2010, 11:23 PM
fwrite() being screwy - by El Forum - 02-22-2010, 12:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB