Geekpedia Programming Tutorials









Extract the file extension using PHP

Extract the file extension of the specified file name / file path using the pathinfo() function.

On Sunday, March 16th 2008 at 07:07 PM
By Andrei Pociu (View Profile)
-----   (Rated 0 with 0 votes)
Contextual Ads
More PHP Resources
Advertisement
  1. function GetFileExtension($Filepath)
  2. {
  3.     $PathInf = pathinfo($Filepath);
  4.     return $PathInf['extension'];
  5. }
Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this code snippet
Comment Current Comments
There are no comments.

Comment Comment on this tutorial
Name: Email:
Message:
Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs PHP Job Search
My skills include:
Enter a City:

Select a State:


Advanced Search >>
Latest Tech Bargains

Advertisement

Free Magazine Subscriptions

Today's Pictures

Today's Video

Other Resources

Latest Downloads

Latest Icons