Possible Duplicate:
How to extract a file extension in PHP?
How can we get file extension with any php function?
Whether there is some built-in function in php. I am using some explode function but any other exists
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can …….
Just Use the following code…….
Pass path of file to this PHP function and get extension.
function extension($path) { $qpos = strpos($path, "?"); if ($qpos!==false) $path = substr($path, 0, $qpos); $extension = pathinfo($path, PATHINFO_EXTENSION); return $extension; }