Jump to content
Larry Ullman's Book Forums

Including Files With ./ Instead Of ../


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?

 

Link to comment
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. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...