Reputation: 121
Ive been trying to work this out:
if(isset($_POST['server'])):
$block = $_POST['ip'];
$file_handle = fopen($file, "a+");
$content = "\n" . $block;
fwrite($file_handle, $content);
fclose($file_handle);
endif;
just doesnt write it in the file. I do have the $file stated.
Upvotes: 0
Views: 53
Reputation: 1680
Put a check in to see if the fopen is successful
if($filehandle) {
// do something
}
I suspect you will find that the file is not open
Upvotes: 1