+ if ( ! is_writable(ABSPATH) ) :
+ setup_config_display_header();
+?>
+<p><?php _e( "Sorry, but I can’t write the <code>wp-config.php</code> file." ); ?></p>
+<p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p>
+<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php
+ foreach( $config_file as $line ) {
+ echo htmlentities($line, ENT_COMPAT, 'UTF-8');
+ }
+?></textarea>
+<p><?php _e( 'After you’ve done that, click “Run the install.”' ); ?></p>
+<p class="step"><a href="install.php" class="button button-large"><?php _e( 'Run the install' ); ?></a></p>
+<script>
+(function(){
+var el=document.getElementById('wp-config');
+el.focus();
+el.select();
+})();
+</script>
+<?php
+ else :
+ $handle = fopen(ABSPATH . 'wp-config.php', 'w');
+ foreach( $config_file as $line ) {
+ fwrite($handle, $line);
+ }
+ fclose($handle);
+ chmod(ABSPATH . 'wp-config.php', 0666);
+ setup_config_display_header();