i have the following code which stopped working recently. The problem is that no data is written to the text file "testFile.txt"
Hi, i have the following code which stopped working recently. The problem is that no data is written to the text file "testFile.txt"
<?php
$myFile = "testFile.txt";
$fh = fopen($myFile, 'a');
$IP = $_SERVER["REMOTE_ADDR"].',';
$logdetails= $IP.date("F j, Y, g:i a O T");
$stringTimeout = $_POST['_delay'];
$stringData1 = $_POST['userChoices'];
$s = ',';
$postData = $s.$stringTimeout.$s.$stringData1."\n";
fwrite($fh,$logdetails.$postData, 'a');
fclose($fh);
header("Location: http://www.google.com");
ex开发者_如何学运维it;
?>
Any ideas why this might be??
Thanks!
Remove , 'a'
in fwrite($fh,$logdetails.$postData, 'a');
. See this document. :)
精彩评论