Answer the question
In order to leave comments, you need to log in
Why can't I clean up a file with php?
There is this code:
<?php
$fo = fopen("cookie.txt", "w");
fclose($fo);
?>
*/1 * * * * /usr/bin/php /home/polzak/ful/index.php
suod chmod 777 ~/ful/cookie.txt
Answer the question
In order to leave comments, you need to log in
And why should it be cleared, you just tear it off for writing, having received the descriptor and immediately close it.
You can write an empty string to it using the fwrite() function.
<?php
$fo = fopen("cookie.txt", "w");
fwrite($fo, "");
fclose($fo);
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question