Re: [PHP] PHP to get File Type

2008-10-14 Thread uaca man
There is a more elegant way: http://br2.php.net/manual/en/function.mime-content-type.php and the preferred way: http://br2.php.net/manual/en/function.finfo-file.php Angelo 2008/10/14 Aschwin Wesselius [EMAIL PROTECTED] Manoj Singh wrote: Hello All, Is there any function in PHP to get

Re: [PHP] PHP to get File Type

2008-10-14 Thread Ashley Sheridan
On Tue, 2008-10-14 at 08:29 -0700, Yeti wrote: function get_file_extension($file) { http://us2.php.net/manual/en/function.pathinfo.php ?php $path_parts = pathinfo('/www/htdocs/index.html'); echo $path_parts['dirname'], \n; echo $path_parts['basename'], \n; echo

Re: [PHP] PHP to get File Type

2008-10-14 Thread Yeti
function get_file_extension($file) { http://us2.php.net/manual/en/function.pathinfo.php ?php $path_parts = pathinfo('/www/htdocs/index.html'); echo $path_parts['dirname'], \n; echo $path_parts['basename'], \n; echo $path_parts['extension'], \n; echo $path_parts['filename'], \n; // since PHP

Re: [PHP] PHP to get File Type

2008-10-14 Thread Yeti
Is there any function in PHP to get the file/Mime type of any file? check this out: http://us2.php.net/manual/en/function.finfo-open.php //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP to get File Type

2008-10-14 Thread Aschwin Wesselius
Manoj Singh wrote: Hello All, Is there any function in PHP to get the file/Mime type of any file? Any help will be appreciated. Hi, There are better and more elegant ways to do this, but I'm not aware of them. Here is what I use most of the time. You only use the filename as $value

[PHP] PHP to get File Type

2008-10-14 Thread Manoj Singh
Hello All, Is there any function in PHP to get the file/Mime type of any file? Any help will be appreciated. Regards, Manoj Kumar Singh