I have this which is probably a roundabout way of finding the path:
<?php require_once $parent_dir = dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))).'/myFile.php'; ?>
It works, but is there a cleaner way of writing it?
My site has a subdomain. Here’s where myFile.php is located:
Sometimes
getcwdcan be useful: