How to Delete all files in a Folder using PHP
This post is about “How to Delete all files in a Folder using PHP”. Some we have seen many useless file in our web server. And they need to free, free for web space. You can delete these file very easily using php. You can delete a particular file in a folder or you can also delete all files in a folder, its upto you. After delete, web server space will be increase. So this is very important to free your server space and also need to delete useless files.
So this tutorial will be very useful for you. You have to follow simple few steps. And this tutorial also very easy to understand. So lets start..
In below code their is two function is used, one glob() and another unlink().
we used glob() function which means to find files in a directory matching a specified pattern. This function returns an array of files/directories, or FALSE on failure.
And we used unlink() function to delete a file
You may also like
Comments ( 1 )
Leave a comment..
Click to login. Login / Sign In
Subscribe Latest Information
Make Money Online (9)
Video Marketing (5)