Absolute URL Path for PHP Website

Posted by kakaajee on Stack Overflow See other posts from Stack Overflow or by kakaajee
Published on 2010-06-14T07:37:39Z Indexed on 2010/06/14 8:02 UTC
Read the original article Hit count: 190

Filed under:
|
|

Hi friends,

I am working on a website in a CMS site. I have provided a link in my footer file e.g blogs.php. This page is at the root like "http://www.example.com/new_cms/blogs.php"

When I moves to other files link like "http://www.example.com/new_cms/forums" the footer link is changed to "http://www.example.com/new_cms/forums/blogs.php" but the blogs.php page resides at path "http://www.example.com/new_cms/" . I tried different $_SERVER[] variables but got no luck to get the above path "http://www.example.com/new_cms/" means the server name with the directory where the project is currently running from.

Any one have idea how to get it done will be a great help.

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about url