• You are not logged in. | Login

Post a reply

  • Index
  •  » Help me!
  •  » how do i separate the filename and extension?

November 17, 2006 6:15 am

mmwfan
Member
Ranks

how do i separate the filename and extension?

Hi, how do you separate the filename and extension from a filename like 'myfilename.pdf'?


 

 

November 23, 2006 12:54 pm

senjor_itc
Member
Ranks

Re: how do i separate the filename and extension?

Hi,

Just use pathinfo($path) function, that will returns the following:

<?php
print_r(pathinfo('test.php')); // File test.php are in the same dir with this file.

// Output: 
// Array ( [dirname] => . [basename] => test.php [extension] => php )
?>

That is all!


 

 
  • Index
  •  » Help me!
  •  » how do i separate the filename and extension?
  • Actions
  • Top
ITCrimea. Ukraine Web Development Company. Professional Developers and Web Designers Team
Custom Web Designs, Internet Applications, E-Commerce Websites, Interactive Sites, Database-Driven Sites and Services