0

我一直在努力解决这个问题:

if(isset($_POST['server'])):
    $block = $_POST['ip'];
    $file_handle = fopen($file, "a+");
    $content = "\n" . $block;
    fwrite($file_handle, $content);
    fclose($file_handle);
endif;

只是不把它写在文件中。我确实有 $file 说明。

4

1 回答 1

1

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

于 2013-09-26T23:45:41.390 回答