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

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

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