[ Index ] [ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]

PHP Cross Reference of TXP stable 4.0.6

title

Body

[close]

/ -> index.php (source)

   1  <?php
   2  /*
   3  $HeadURL: http://svn.textpattern.com/releases/4.0.6/source/index.php $
   4  $LastChangedRevision: 2774 $
   5  */
   6  
   7      // Make sure we display all errors that occur during initialization
   8      error_reporting(E_ALL);
   9      @ini_set("display_errors","1");
  10  
  11      if (@ini_get('register_globals'))
  12          foreach ( $_REQUEST as $name => $value )
  13              unset($$name);
  14      define("txpinterface", "public");
  15      if (!defined('txpath'))
  16          define("txpath", dirname(__FILE__).'/textpattern');
  17  
  18      // Use buffering to ensure bogus whitespace in config.php is ignored
  19      ob_start(NULL, 2048);
  20      $here = dirname(__FILE__);
  21      include txpath.'/config.php';
  22      ob_end_clean();
  23  
  24      include txpath.'/lib/constants.php';
  25      if (!isset($txpcfg['table_prefix']))
  26      {
  27          $status = '503 Service Unavailable';
  28          if (IS_FASTCGI)
  29              header("Status: $status");
  30          elseif ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0')
  31              header("HTTP/1.0 $status");
  32          else
  33              header("HTTP/1.1 $status");
  34  
  35          $msg = 'config.php is missing or corrupt.  To install Textpattern, visit <a href="./textpattern/setup/">textpattern/setup/</a>';
  36          exit ($msg);
  37      }
  38  
  39      include txpath.'/publish.php';
  40      textpattern();
  41  
  42  ?>


Generated: Mon Feb 18 03:42:45 2008 Cross-referenced by PHPXref 0.7