personally, I like using:
require_once("path/to/your/file");
NOTE: the difference between 'require' and 'include' function is that if the file cannot be found and inserted efor whatever reason then if you use 'include' the program will continue to execute and possibly with problems because it could not include the external file. With 'require' on the other hand, the execution of the program terminates since it "requires" the file to continue. When you call the '_once'
version of the functions ('include_once' or 'require_once' it means that if the same file has already been 'included' or 'required' either in the same program or some other file you may have included or required then it won't cause problems. Otherwise, including the same files with ('include' or 'require' more than once in the same program will cause problems.)
So suppose I'm working in file called 'file1.php' and it is in the directory 'directory1' which is sitting in the document root. Then the absolute path to file1.php is: '/directory1/file1.php'. Now suppose you want to include a file called 'file2.php' which sits in director1 and you want to include it inside file1.php. Then you would make this call inside 'file1.php' :
require_once('/directory1/file2.php');
but also, since both file1.php and file2.php are both in the same directory you could provide an absolute path (i.e. just give the name of the file to the require_once function ) like so:
require_once('file2.php');
Note: this only works if 'file2.php' is in the same directory as 'file1.php'.