Is this the right way to go about referencing a file in a parent directory relative to a php source file?:
require_once('../referenced_file.php');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To include a file relative to the current source file you should use the full path:
As the current working directory is set to the directory of the script that was initially executed.