Getting rid of files from domain name using PHP

前端 未结 1 1818
南笙
南笙 2021-01-29 05:01

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

相关标签:
1条回答
  • 2021-01-29 05:48

    ok I found the answer :

    <? echo dirname("http://website.com/folder1/file.php"); ?>
    

    so the url will look like this :

    http://website.com/folder1/
    
    0 讨论(0)
提交回复
热议问题