WordPress.org

Make WordPress Core

Ticket #2866: wp-blog-header-phantom-fix.diff

File wp-blog-header-phantom-fix.diff, 1.1 KB (added by RuddO, 12 years ago)

fix for running multiple WP blogs with a single source dir

  • wp-blog-header.php

     
    11<?php
    22
    33if (! isset($wp_did_header)):
    4 if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) {
     4if ( !file_exists( getcwd() . '/wp-config.php') ) {
    55        if ( strstr( $_SERVER['PHP_SELF'], 'wp-admin') ) $path = '';
    66        else $path = 'wp-admin/';
    77    die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='{$path}setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.");
     
    99
    1010$wp_did_header = true;
    1111
    12 require_once( dirname(__FILE__) . '/wp-config.php');
     12require_once( getcwd() . '/wp-config.php');
    1313
    1414wp();
    1515gzip_compression();
     
    1818
    1919endif;
    2020
    21 ?>
    22  Sin fin-de-línea al final del archivo
     21?>