auto_prepend_file - Parse PHP before the requested PHP loads
Ever had to do some legacy hacking or changing of $_SERVER vars for different OS and wish you didn’t have to ruin your beautiful application? Well maybe auto_prepend_file is the answer! This is a little known core php directive, which when used in a HTACCESS can let specify a php document to be parsed before the document that has been called is parsed - and for every document in the given directory for that matter. Personally I’ve been using it to set constants which may/ or may not be set and for workarounds when libraries dont exits, but even more simple use it to include a global config file with paths to various assets etc for your website





