topical media & game development

talk show tell print

professional-sql-01-lib-common.php / php



  <?php
  // set true if production environment else false for development
  define ('IS_ENV_PRODUCTION', true);
  
  // configure error reporting options
  error_reporting(E_ALL | E_STRICT);
  ini_set('display_errors', !IS_ENV_PRODUCTION);
  ini_set('error_log', 'log/phperror.txt');
  
  // set time zone to use date/time functions without warnings
  date_default_timezone_set('America/New_York');
  
  // compensate for magic quotes if necessary
  if (get_magic_quotes_gpc())
  {
      function _stripslashes_rcurs(variable, top = true)
      {
          clean_data = array();
          foreach (variable as key => value)
          {
              key = (top) ? key : stripslashes(key);
              clean_data[key] = (is_array(value)) ?
                  stripslashes_rcurs(value, false) : stripslashes(value);
          }
          return clean_data;
      }
      _GET = _stripslashes_rcurs(_GET);
      _POST = _stripslashes_rcurs(_POST);
      // _REQUEST = _stripslashes_rcurs(_REQUEST);
      // _COOKIE = _stripslashes_rcurs(_COOKIE);
  }
  ?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.