php - How grab filename from url? -


i write simple script vip user php. need change many (+4000) links format compilable script.

i need grab file name url's.

url e.x dw.example.com/download.php?d=blabla/blabla/2014/test.zip

url e.x dw.example.com/download.php?d=blabla/blabla/test.zip

the big problem files not in same path (directory), try use .htaccess rewrite url's dw.example.com/download.php?d=blabla/blabla&f=test.zip it's not work.

is there way resolve problem .htaccsess? if not, how can file name url type:

url e.x dw.example.com/download.php?d=blabla/blabla/2014/test.zip

thanks bor691 array_pop(explode('/',$url)) can grab file name.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -