Example of deleting a group of files in php
Release: 2016-07-25 08:56:05
Original
898 people have browsed it
2,删除一组文件的代码 process.php
-
- # Take each checked value, and give it a name of $delete
- foreach($_POST['delete'] as $delete){
- # Make sure the file actually exists
- if(file_exists("/location/of/directory/".$delete)){
- # Delete each file
- unlink("/location/of/directory/",$delete);
- }else{
- continue;
- }
- }
- # Return to form.html
- header("Location: form.html");
- ?>
复制代码
您可能感兴趣的文章:
Php删除指定文件与文件夹的方法
PHP删除N分钟前创建的所有文件的小例子
php实例:批量删除文件夹及文件夹中的文件
删除指定文件夹中所有文件的php代码
删除多级目录的php自定义函数
php递归删除文件与目录的代码
php递归删除目录及多级子目录下所有文件的代码
php递归创建和删除文件夹的代码
php递归删除目录的例子
|
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31