Re: Readdir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



something like this?

while ( gettype ( $file = @readdir (@opendir ( $dirname )) ) != boolean ){
	check if correct extension, else -> something completely else?
}

On Tuesday 28 November 2006 09:55, Tom Chubb wrote:
> What would be the best way to retrieve a list of files from an upload
> folder that are called "id" where the extension could be .doc .txt or
> .pdf
> For example, I have a folder where people can upload a document and
> the document is renamed as their user id. They can upload a PDF, DOC
> or TXT file. They may wish to upload one of each. I am using
> file_exists for each case, but is there an easier/tidier way of doing
> it?
> Thanks in advance,
>
> Tom

-- 
---
Børge
Kennel Arivene 
http://www.arivene.net
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux