These versions are kept inside subfolders names resized, thumbnails and icons respecively. For instance imagine the case when you want to delete an image that exists in multiple versions, such as the original, a thumbnail and an icon version. Below is a function which enables you do do that, but with the security feature of adding a root directory, from which everything must origin – tu avoid unpleasant dataloss. Sometimes it is nice to be able to recursively delete specific files in folder structures using PHP. PHP recursively get the tree menu and traverse all files and subfolders under the folder One, use recursion to get the tree menu Data table category(id,name,parentid) 2. ![]() The default functionality in PHP and Unix is very careful when it comes to deleting stuff recursively. Sometimes you also need to delete files, sometimes even large groups of files or directories including all their subdirectories. You may want to store dem in a file structure, instead of creating them again and again on every request. Say you generate images, PDF files or downloadable archives from your scripts. Have you ever tried to manage files and folders from PHP? In some cases it makes good sense to manage some files with PHP.
0 Comments
Leave a Reply. |