From e588a9ec13a3884f35804a08e63a617616158a16 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 31 Aug 2005 10:34:15 +0000 Subject: Check if .htaccess exists and is writeable on install. git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@262 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- index.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 8e128ce..ff197ee 100644 --- a/index.php +++ b/index.php @@ -197,6 +197,15 @@ function checkdirs() { print "Refresh this page when you're done!

"; print ""; } + if( file_exists( "./.htaccess" ) && is_writeable( "./.htaccess" ) == false ) { + $ret = false; + print "

Warning! .htaccess already exists.

"; + print "
"; + print "

A file with the name '.htaccess' already exists in this directory and I cannot write to it. Please ftp to the server and delete this file from this directory!
"; + print "Offending file: " . realpath( '.htaccess' ) . "

"; + print "
"; + } + return $ret; } -- cgit