kks_krishna Posted July 15, 2007 Share Posted July 15, 2007 HI, I want to use the relative path in PHP include. see the following include code. For example if my site is www.site.com. Then I want to give the same type of URL every where so that it shd be taken from the relative path. What should be the correct way? include("/dlinks/files/LinkOperations.php"); Quote Link to comment Share on other sites More sharing options...
trq Posted July 15, 2007 Share Posted July 15, 2007 Hard to tell without seeing your directory structure but the leading / points to your root. Its usually much easier to use $_SERVER['DOCUMENT_ROOT'] and create an absolute path. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.