Wasabi Posted September 24, 2011 Share Posted September 24, 2011 Would someone explain the following snippet, and when it is useful? require_once(dirname(dirname(__FILE__)) . '/inc/class/DAL.php'); It generates a path, but unsure when it's use is preferred to simple require_once('path/to/file') syntax. Link to comment Share on other sites More sharing options...
HartleySan Posted September 26, 2011 Share Posted September 26, 2011 The above seems very similar to the usage of a relative path, in that even if the files are moved around on the server, so long as the relative location of the files is the same, everything will still work. Never seen that though, so not really sure. Link to comment Share on other sites More sharing options...
Recommended Posts