All these errors are being caused by the 1st one.
if file_get_contents fails then fopen is going to fail then fputs will fail and then fclose will fail.. what you need to do is make some simple error handling methods. Error seems to be saying the file your trying to open doesnt exist.
Try Out This::
PHP Code:
if (isset($_GET['data'])) {
$filename = 'test.txt';
if (file_exsits($filename)) {
$file_data = file_get_contents($filename);
$file_data = str_replace($somecontent, "", $file_data);
$file = fopen($filename, "w");
fputs($file, $file_data);
fclose($file);
}
}
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --