Re: [PHP-DB] evaluate file type

2002-02-25 Thread Bas Jobsen

 I create a
 list with readdir so i can show a list of files that user can download.
you already have the filename?
?
List($file,$extension )=explode(.,$filename);
?


Op maandag 25 februari 2002 10:22, schreef Nautilis:
 Hi everybody

 I am wondering if there is any way to evaluate which kind of file i have on
 my server.

 Explanation:

 I have a website where i upload some files for my registered users. I
 upload every file to a certain folder. Every user has his own folder so i
 upload some files to some users and some other to other users. I create a
 list with readdir so i can show a list of files that user can download.

 What I am trying to do is to evaluate the extension of that file so i can
 show an icon, at least for certain types, for example PDF, GIF, JPG. ZIP
 and WORD documents, and a general icon for the rest of file extensions.

 Anybody can point me into the right direction for evaluate this?

 Thx alot in advance to anybody reading this post.

 Nautilis

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




Re: [PHP-DB] evaluate file type

2002-02-25 Thread Jason Wong

On Monday 25 February 2002 17:22, Nautilis wrote:
 Hi everybody

 I am wondering if there is any way to evaluate which kind of file i have on
 my server.

 Explanation:

 I have a website where i upload some files for my registered users. I
 upload every file to a certain folder. Every user has his own folder so i
 upload some files to some users and some other to other users. I create a
 list with readdir so i can show a list of files that user can download.

 What I am trying to do is to evaluate the extension of that file so i can
 show an icon, at least for certain types, for example PDF, GIF, JPG. ZIP
 and WORD documents, and a general icon for the rest of file extensions.

 Anybody can point me into the right direction for evaluate this?

If you're using Linux there is a command called 'file' which does a good job 
identifying what type a particular file is.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Give me chastity and continence, but not just now.
-- St. Augustine
*/

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