How to delete the file in php


















Page will redirect to clear. Dariusz J Dariusz J 6 6 silver badges 11 11 bronze badges. Use 'w' and not, 'a'. Florent Fredrik Fredrik 5, 2 2 gold badges 23 23 silver badges 31 31 bronze badges. Javad Masoumi Javad Masoumi 87 4 4 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.

Unable to delete file" error in Android Studio. Article Contributed By :. Easy Normal Medium Hard Expert.

Writing code in comment? Please use ide. Load Comments. What's New. The idea is to iterate over the files lines. This is done with all following lines. I guess that this is faster for bigger files because nothing is copied. And I guess that at some file size the other answers do not work at all while this one should.

But I didn't test it. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to delete a line from the file with php? Ask Question. Asked 10 years, 9 months ago. Active yesterday. Viewed 91k times. Is it possible to use awk? Improve this question. Add a comment. Ask Question. Asked 11 years, 10 months ago. Active 2 years, 10 months ago.

Viewed k times. How do I delete a file from my server with PHP if the file is in another directory? I'm using the unlink function: unlink '..

Any ideas? Improve this question. Ken Ken 2, 3 3 gold badges 24 24 silver badges 29 29 bronze badges. See this thread for more info: stackoverflow. Add a comment. Active Oldest Votes. Improve this answer. Gordon Gordon k 69 69 gold badges silver badges bronze badges.



0コメント

  • 1000 / 1000