Gracias, ya tengo lo que necesito:
Código PHP:
The code below is an alternative to the basename() function in PHP, and it is here to illustrate the use of the substr() function.
/********************************************
Getting the file name from an address
like [url]http://www.xpto12345.xyz/abc/def/ghi.php[/url]
using substr() function
********************************************/
// This procedure only works when the filename
// is at the end of the string
$fn="abc/def/ghi/jkl.php"; // 'where is the filename' string
$a = strlen("$fn");
while ($a>0){
if(substr(substr($fn, $a, strlen($fn)), 0, 1)=="/"){break;}
$b=substr($fn, $a, strlen($fn));
$a=$a-1;
}
print $b;