New course! Every coder should learn Generative AI!
Try a free lesson0
How can i delete all of the file content?
2 Answers
0
you can use the following code.
$file = fopen("file.txt","x");
it will delete all your previous data in file.
0
fopen with x-permisson.