require dirname(__FILE__).'/yahooPHP/lib/Yahoo.inc';
This line is in one file in one directory and I am having trouble determining how to reference a file in another directory.
What does this expression mean and does it imply references must only be within the same directory?
__FILE__
is a Magic Constant that correspond to the full path to the file into which it is written.
This means that dirname(__FILE__)
points to the directory into which your current file (the one in which this is written) is.
So, dirname(__FILE__).'/yahooPHP/lib/Yahoo.inc'
points to :
yahooPHP
subdirectory of that directorylib
subdirectory of yahooPHP
Yahoo.inc
file into that lib
directory.Basically, you have :
your-file.php
yahooPHP/
lib/
Yahoo.inc