File characters speration
Posted: Thu Sep 17, 2009 7:19 am
Hi,
My issue is i have to browse a file from the form and submit it, when i click submit only the file name and it's extension should be considered, i mean if i select a file, in the text file it is taking the entire file path example: C:\windows\temp\file.php
all i need to do is i have to submit only the " file.php ", i have gone thru the
it will return only php
plz kindly give me the solution for this
My issue is i have to browse a file from the form and submit it, when i click submit only the file name and it's extension should be considered, i mean if i select a file, in the text file it is taking the entire file path example: C:\windows\temp\file.php
all i need to do is i have to submit only the " file.php ", i have gone thru the
Code: Select all
<?php
$ext = substr(strrchr($filename, '.'), 1);
?>plz kindly give me the solution for this