Changeset 11301 for trunk/wp-admin/setup-config.php
- Timestamp:
- 05/12/2009 04:47:49 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/setup-config.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/setup-config.php
r10698 r11301 27 27 /**#@-*/ 28 28 29 require_once( '../wp-includes/compat.php');30 require_once( '../wp-includes/functions.php');31 require_once( '../wp-includes/classes.php');29 require_once(ABSPATH . WPINC . '/compat.php'); 30 require_once(ABSPATH . WPINC . '/functions.php'); 31 require_once(ABSPATH . WPINC . '/classes.php'); 32 32 33 if (!file_exists( '../wp-config-sample.php'))33 if (!file_exists(ABSPATH . 'wp-config-sample.php')) 34 34 wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.'); 35 35 36 $configFile = file( '../wp-config-sample.php');36 $configFile = file(ABSPATH . 'wp-config-sample.php'); 37 37 38 if ( !is_writable( '../'))38 if ( !is_writable(ABSPATH)) 39 39 wp_die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually."); 40 40 41 41 // Check if wp-config.php has been created 42 if (file_exists( '../wp-config.php'))42 if (file_exists(ABSPATH . 'wp-config.php')) 43 43 wp_die("<p>The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>"); 44 44 45 45 // Check if wp-config.php exists above the root directory but is not part of another install 46 if (file_exists( '../../wp-config.php') && ! file_exists('../../wp-settings.php'))46 if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) 47 47 wp_die("<p>The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>"); 48 48 … … 156 156 wp_die($wpdb->error->get_error_message()); 157 157 158 $handle = fopen( '../wp-config.php', 'w');158 $handle = fopen(ABSPATH . 'wp-config.php', 'w'); 159 159 160 160 foreach ($configFile as $line_num => $line) { … … 180 180 } 181 181 fclose($handle); 182 chmod( '../wp-config.php', 0666);182 chmod(ABSPATH . 'wp-config.php', 0666); 183 183 184 184 display_header();
Note: See TracChangeset
for help on using the changeset viewer.