Jump to content
Larry Ullman's Book Forums
Sign in to follow this  

Recommended Posts

In this book in chapter 2 script 2.4 index.php. 

It says to include the configuration file: require('./includes/config.inc.php');

 

How can you reference a file with ./, shouldn't it be ../

I tried it and it doesn't work. Is this a mistake in the book?

 

Share this post


Link to post
Share on other sites

Not a mistake, those have two different meanings. A single period starts in the current directory, so ./file is the same as just file. Two periods say you should go up one directory, so ../ means to head into the parent directory of the current one. If one works for you and the other doesn't, your file structure is just different than that in the book. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...