11 * |
11 * |
12 * Will also search for wp-config.php in WordPress' parent |
12 * Will also search for wp-config.php in WordPress' parent |
13 * directory to allow the WordPress directory to remain |
13 * directory to allow the WordPress directory to remain |
14 * untouched. |
14 * untouched. |
15 * |
15 * |
|
16 * @internal This file must be parsable by PHP4. |
|
17 * |
16 * @package WordPress |
18 * @package WordPress |
17 */ |
19 */ |
18 |
20 |
19 /** Define ABSPATH as this files directory */ |
21 /** Define ABSPATH as this file's directory */ |
20 define( 'ABSPATH', dirname(__FILE__) . '/' ); |
22 define( 'ABSPATH', dirname(__FILE__) . '/' ); |
21 |
23 |
22 if ( defined('E_RECOVERABLE_ERROR') ) |
24 error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); |
23 error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); |
|
24 else |
|
25 error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); |
|
26 |
25 |
27 if ( file_exists( ABSPATH . 'wp-config.php') ) { |
26 if ( file_exists( ABSPATH . 'wp-config.php') ) { |
28 |
27 |
29 /** The config file resides in ABSPATH */ |
28 /** The config file resides in ABSPATH */ |
30 require_once( ABSPATH . 'wp-config.php' ); |
29 require_once( ABSPATH . 'wp-config.php' ); |
31 |
30 |
32 } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) { |
31 } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) { |
33 |
32 |
34 /** The config file resides one level above ABSPATH but is not part of another install*/ |
33 /** The config file resides one level above ABSPATH but is not part of another install */ |
35 require_once( dirname(ABSPATH) . '/wp-config.php' ); |
34 require_once( dirname(ABSPATH) . '/wp-config.php' ); |
36 |
35 |
37 } else { |
36 } else { |
38 |
37 |
39 // A config file doesn't exist |
38 // A config file doesn't exist |
40 |
39 |
41 // Set a path for the link to the installer |
40 // Set a path for the link to the installer |
42 if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = ''; |
41 if ( strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false ) |
43 else $path = 'wp-admin/'; |
42 $path = 'setup-config.php'; |
|
43 else |
|
44 $path = 'wp-admin/setup-config.php'; |
|
45 |
|
46 define( 'WPINC', 'wp-includes' ); |
|
47 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); |
|
48 require_once( ABSPATH . WPINC . '/load.php' ); |
|
49 require_once( ABSPATH . WPINC . '/version.php' ); |
|
50 |
|
51 wp_check_php_mysql_versions(); |
|
52 wp_load_translations_early(); |
|
53 |
|
54 require_once( ABSPATH . WPINC . '/functions.php' ); |
44 |
55 |
45 // Die with an error message |
56 // Die with an error message |
46 require_once( ABSPATH . '/wp-includes/classes.php' ); |
57 $die = __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>'; |
47 require_once( ABSPATH . '/wp-includes/functions.php' ); |
58 $die .= '<p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>'; |
48 require_once( ABSPATH . '/wp-includes/plugin.php' ); |
59 $die .= '<p>' . __( "You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>'; |
49 $text_direction = /*WP_I18N_TEXT_DIRECTION*/'ltr'/*/WP_I18N_TEXT_DIRECTION*/; |
60 $die .= '<p><a href="' . $path . '" class="button">' . __( "Create a Configuration File" ) . '</a>'; |
50 wp_die(sprintf(/*WP_I18N_NO_CONFIG*/'Je ne trouve pas votre fichier <code>wp-config.php</code>. J’en ai besoin avant de lancer l’installation.<br />Besoin d’aide ? <a href=\'http://codex.wordpress.org/fr:Installer_WordPress\'>En voici</a>.</p><p>Vous pouvez créer un fichier <code>wp-config.php</code> à l’aide de notre interface Web, mais ça ne marche pas pour toutes les configurations de serveur. La méthode la plus sûre reste de créer le fichier à la main.</p><p><a href=\'%ssetup-config.php\' class=\'button\'>Créer le fichier de configuration</a>'/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress » Erreur'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction)); |
|
51 |
61 |
|
62 wp_die( $die, __( 'WordPress › Error' ) ); |
52 } |
63 } |
53 |
|
54 ?> |
|