I have the following URLs:
http://website.com/folder1/file.php http://website.com/folder2/file.html
I want to know if there is any way in PHP
ok I found the answer :
<? echo dirname("http://website.com/folder1/file.php"); ?>
so the url will look like this :
http://website.com/folder1/