note 80536 added to function.filetype

From: Date: Mon, 21 Jan 2008 10:20:18 +0000
Subject: note 80536 added to function.filetype
Groups: php.notes 
Request: Send a blank email to php-notes+get-135278@lists.php.net to get a copy of this message
//you can get file extension through this function <?php function fileExtension($filename) { //check if this file exists and not a directory if(is_file($filename)) { $path_info = pathinfo($filename); /* echo $path_info['dirname'], "\n"; echo $$path_info['basename'], "\n"; echo $path_info['extension'], "\n"; echo $path_info['filename'], "\n"; // since PHP 5.2.0 */ return $path_info['extension']; } else { return false; } } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 212.118.6.227 (proxied: 212.118.6.227) ---- Manual Page -- http://www.php.net/manual/en/function.filetype.php Edit -- https://master.php.net/note/edit/80536 Del: integrated -- https://master.php.net/note/delete/80536/integrated Del: useless -- https://master.php.net/note/delete/80536/useless Del: bad code -- https://master.php.net/note/delete/80536/bad+code Del: spam -- https://master.php.net/note/delete/80536/spam Del: non-english -- https://master.php.net/note/delete/80536/non-english Del: in docs -- https://master.php.net/note/delete/80536/in+docs Del: other reasons-- https://master.php.net/note/delete/80536 Reject -- https://master.php.net/note/reject/80536 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135278) next »