Jump to content

Recommended Posts

Ok, so for some reason when I use

 

include "/Navigation.php";

 

It comes back with

 

 

Warning: include(/Navigation.php) [function.include]: failed to open stream: No such file or directory in /home/parkerco/public_html/Portfolio/innorvarite.php on line 25

 

Now, Navigation.php is at the root folder (public_html) and I'm trying to call it from any folder. How can I just make it an absolute without using http://parkercodes.com? I thought in absolute paths, putting / at the front meant root directory

Link to comment
https://forums.phpfreaks.com/topic/178097-including-a-file-in-the-root-directory/
Share on other sites

If Navigation.php is in a folder called public_html, then it is per definition not in the root folder...

 

I thought that in web directories the folder that is in the top level of the domain is considered the parent. IE, where parkercodes.com/index.php resides. Or is that only for HTML and Javascript?

That's only on the client side unless your server is chroot'ed. The root directory on a file system is always the top-most folder because of the tree like structure a filesystem is organized in.

 

Cool, thanks for the info.

 

And I know about that Kaboom. I just wanted to know how to do root, not parent. Just an addition of knowledge. Daniel0 fueled that expedition of knowledge

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.