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. I wonder how w3shools is doing this? Gordon i am sorry.. RitabrataGautam "if i need to visit three other links to understand your reply is it very helpful? Because after going to the links you will have understood how it works. If I just give you the codes, you will not understand but just copy and paste.
What did you learn then? October 6, October 8, October 5, October 5, Skip to content Sometimes we need to do some basic tasks in the project like rename, copy, delete and move the file from one location to another. Spread the love. Related Posts. Laravel create custom middleware for redirections to non index.
Save Article. Like Article. Last Updated : 31 Jul, Previous PHP ftell Function. Next PHP unlink Function. Recommended Articles.
Different Ways to fix "Execution failed for task ':app:clean'. Unable to delete file" error in Android Studio. Article Contributed By :.
Easy Normal Medium Hard Expert.
0コメント