i have some url for example http://www.example.com/dir/foo.php?fruit=apple&color=red http://www.example.com/dir/aamn.php?fruit=apple&color=red
u know it:
$sBasePath = $_SERVER['PHP_SELF'] ;
give /dir/foo.php /dir/aamn.php
but i need to it give /dir/
and i want to use the same code in all of my page to get the paths of folder without file name.
is there any way?
[man]dirname[/man] [man]pathinfo[/man]