
- You are not logged in. | Login
November 17, 2006 6:15 am
- mmwfan
- Member


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


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!


