TomTees Posted November 27, 2010 Share Posted November 27, 2010 What does this code mean with respect to the file path?? include ('./includes/header.html'); TomTees Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 27, 2010 Share Posted November 27, 2010 The dot means current directory. So that would read "the header.html file, which is in the includes directory, which is in the current directory". Quote Link to comment Share on other sites More sharing options...
TomTees Posted November 27, 2010 Author Share Posted November 27, 2010 The dot means current directory. So that would read "the header.html file, which is in the includes directory, which is in the current directory". So how is that different than... include ('includes/header.html'); TomTees Quote Link to comment Share on other sites More sharing options...
trq Posted November 27, 2010 Share Posted November 27, 2010 Its not. Quote Link to comment Share on other sites More sharing options...
TomTees Posted November 27, 2010 Author Share Posted November 27, 2010 Its not. Hmmm... Interesting... Well, I like my way better for brevity's sake. (But I did learn a new way to say the same thing...) Thanks, TomTees Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 27, 2010 Share Posted November 27, 2010 In that context it isn't, really. There may be a specific reason to use it in certain instances, but if there is, I'm not aware of it, (except on the command line). Quote Link to comment Share on other sites More sharing options...
trq Posted November 27, 2010 Share Posted November 27, 2010 Well, to be precise, the one starting with ./ is an absolute path and the other is relative. They both however point to the same location. ps: These have nothing to do with php per say either. The are part of your OS's file system. Quote Link to comment Share on other sites More sharing options...
TomTees Posted November 27, 2010 Author Share Posted November 27, 2010 Well, to be precise, the one starting with ./ is an absolute path and the other is relative. They both however point to the same location. ps: These have nothing to do with php per say either. The are part of your OS's file system. Okay. So, back to an earlier thread... How would I say, "The current directory."?? How would I say, "The Web Root."?? TomTees Quote Link to comment Share on other sites More sharing options...
trq Posted November 27, 2010 Share Posted November 27, 2010 How would I say, "The current directory."?? ./ How would I say, "The Web Root."?? $_SERVER['DOCUMENT_ROOT'] 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.