PHP Get only directory path

Posted by Adrian M. on Stack Overflow See other posts from Stack Overflow or by Adrian M.
Published on 2010-04-08T17:00:13Z Indexed on 2010/04/08 17:03 UTC
Read the original article Hit count: 278

Filed under:
|
|
|

Hello,

I have:

$page_file_temp = $_SERVER["PHP_SELF"];

which will output: /templates/somename/index.php

I want to extract from that path only "/templates/somename/"

How can I do it? Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about get