PHP: how to get the path of the currently executing script?

Posted by powerboy on Stack Overflow See other posts from Stack Overflow or by powerboy
Published on 2010-05-25T05:33:15Z Indexed on 2010/05/25 5:41 UTC
Read the original article Hit count: 195

Filed under:

For example, the url http://www.domain.com/folder/script.php sends a request to /var/www/domain/folder/script.php. In script.php, I want to echo http://www.domain.com/folder/ (not /var/www/domain/folder/). How to do this?

© Stack Overflow or respective owner

Related posts about php