I import website files at the top of each page using:
require_once('../file.php');
Is this the correct approach? Or should I be using a different PHP function/approach to access private files? I'm concerned that this approach may be prone to directory traversal attacks.