1 pointI personally do the following and call it a day: define("APP_ROOT", dirname(dirname(__FILE__))); define("PRIVATE_PATH", APP_ROOT . "/private"); define("PUBLIC_PATH", APP_ROOT . "/public"); require_once PRIVATE_PATH . "/vendor/autoload.php"; require_once PRIVATE_PATH . "/security/security.php"; require_once PRIVATE_PATH . "/config/config.php";
1 pointIt's generally not good design if you have to pull a path like that dynamically. A script sending the email should simply write the required /LifeSaverHTML/Details/20 or whatever directly. By the way, dirname on the REQUEST_URI can be very easily fooled. Definitely don't do that.
This leaderboard is set to New York/GMT-04:00