You are here: Re: File deleter « All PHP « IT news, forums, messages
Re: File deleter

Posted by Andy on 02/05/07 00:07

"Arjen" <dont@mail.me> wrote in message
news:45c641f9$0$64626$dbd4d001@news.wanadoo.nl...
> Andy schreef:
>> I have many pictures in the folder. Some of them I want to delete.
>> Because my FTP server shows only 1000 pictures, I am using following
>> script. Unfortunately it deletes single files only and it takes a time to
>> reload after deleting.
>> What I want is your help to modify this script so I would make check
>> marks at the file and than press a button to delete selected files.
>> I am sure there are people who would do it without a problem.
>> Your help will be appreciated.
>
> Presuming the files have no strange characters. Otherwise use
> urlencode($file) iirc. I didn't test this btw so be carefull (use echo
> "unlink ('/path/to/file/'$file)"; first
>
> if (isset($_POST))
> {
> foreach ($_POST['file'] as $myfile)
> {
> unlink('/path/to/file'.$file);
> }
> }
>
> echo '<form>'; // etc
> $handle=opendir($path);
> while (false!==($file = readdir($handle))) {
> if ($file != "." && $file != "..") {
> echo '<input type="checkbox" name="file[]"
> value="'.$file.'"/>'.$file.'<br/>
> }
> }
> closedir($handle);
> echo '<input type = "submit">';//etc
>
> --
> Arjen
> http://www.hondenpage.com
>

I tried to follow your message but I get a parse error.
I am a new to PHP and do not know how to modify my script.
In order to test it place it in any directory on your site. It is really
nice deleter, but I need multiple file deleter with check boxes.
Andy.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация