samedi 30 janvier 2016

Random PHP txt create

I have a question. I made a small project that will want to be like other text pasting an keeping software. This is the main little code:

fopen("text/$file.txt", "w+");

fwrite($file, $data);

fclose("text/$file.txt");
}
else {
die('No post data to process');
}
?>

The problem is that it gives me these errors:

Warning: fwrite() expects parameter 1 to be resource, integer given in /home/u257807476/public_html/ready.php on line 8

Warning: fclose() expects parameter 1 to be resource, string given in /home/u257807476/public_html/ready.php on line 10

I don't know why. Please help me!




Aucun commentaire:

Enregistrer un commentaire