Clean up get_filename_from_url.

This commit is contained in:
Colin Smith 2005-07-22 03:54:31 +00:00
parent 3613998c9b
commit 3a3c6b5ba1

View File

@ -492,9 +492,7 @@ function add_text_to_file($file, $text) {
* get_filename_from_url($url): converts a url to its filename.
*/
function get_filename_from_url($url) {
$filenamesplit = split("/", $url);
foreach($filenamesplit as $fn) $filename = $fn;
return $filename;
return array_pop(explode("/", $filename));
}
/*
@ -988,4 +986,4 @@ function generate_random_mac() {
return $mac;
}
?>
?>