From 65f4c3a448939d8a208ab48f5c165d0ac15a2760 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 21 Jul 2005 10:37:55 +0000 Subject: If .htaccess can't be created then abort with a helpful message! git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@59 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- index.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7701faf..1276e0f 100644 --- a/index.php +++ b/index.php @@ -99,7 +99,7 @@ function do_htaccess( $oldfilename, $newfilename, $realpath, $base, $url ) } if( is_file( $oldfilename ) ) { - $fp = fopen( $oldfilename, "r" ); + $fp = @fopen( $oldfilename, "r" ); if( $fp ) { while( !feof( $fp ) ) @@ -113,7 +113,14 @@ function do_htaccess( $oldfilename, $newfilename, $realpath, $base, $url ) $fp = fopen( $newfilename, "w" ); fwrite( $fp, $htaccess ); fclose( $fp ); - } + } else { + print "

There was a problem creating the .htaccess file in $realpath. Please ensure that the webserver can write to this directory.

"; + print "

If all else fails then you'll have to create it by hand:"; + print "