I have a problem with getting the extension of a filename...
at first what i did is to do like this
Code: Select all
$file = hello.php;
$ext= explode('.',$file);
//so i get $ext[1] which is .php
$file = hello.cfg.inc.php;
with my code, i can get cfg instead of the php that i want to get....
So, how can i get the real file extension of a file?
thanks...