If I understand correctly you want to cut the filename off the pathname.
this will do it.
<?
$filename="c:\windows\temp\myimage.jpg"
$bits=explode("\", $filename);
$act_name=$bits[(count($bits)-1)];
echo $act_name;
?>
it cuts the name up based on the slashes then uses the count function to get the highest number. Subtract one to get the last element of the array and this is your filename.
Mark.