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
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
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
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
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
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
6 matches
Mail list logo