Nie można się połaczyć:
' . mysqli_connect_error() . '

'; else echo '

Połączenie nawiązane

'; mysqli_close( $mysqli ); } if ( $_POST['action'] == 'install' ) { $mysqli = new mysqli( $_POST['host'], $_POST['user'], $_POST['password'], $_POST['name'] ); $mysqli -> set_charset( 'utf8' ); $file_sql = file_get_contents( 'https://shoppro.project-dc.pl/updates/shopPRO_sql.txt' ); $sql_commands = explode( ';', $file_sql ); for ( $i = 0; $i < count( $sql_commands ) - 1; $i++ ) $result = $mysqli -> query( $sql_commands[$i] ); mysqli_close( $mysqli ); $file = file_get_contents( 'https://shoppro.project-dc.pl/updates/shopPRO.zip' ); $dlHandler = fopen( 'update.zip', 'w' ); if ( !fwrite( $dlHandler, $file ) ) fclose( $dlHandler ); $file_name = 'update.zip'; $path = pathinfo( realpath( $file_name ), PATHINFO_DIRNAME ); $path = substr( $path, 0, strlen( $path ) ); $zip = new \ZipArchive; $res = $zip -> open( $file_name ); if ( $res === TRUE ) { $zip -> extractTo( $path ); $zip -> close(); unlink( $file_name ); } $config = ""; file_put_contents( 'config.php', $config ); unlink( 'install.php' ); header( "location:/index.php?action=htaccess" ); } ?> cmsPro - instalator

Instalacja