February 22, 2008

auto_prepend_file - Parse PHP before the requested PHP loads

You will find other articles relevant to this document in these sections:
Richard Lee @ 4:57 pm

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 ;)

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Furl
  • Reddit
  • YahooMyWeb

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment