Пример #1
0
            "bitbucket" => "",
            "stackoverflow" => ""
        ),
        "plugins" => array(
            "markdown_syntax"
        ),
    );
    ');
    // Write in file .htaccess
    $htaccess = file_get_contents(".htaccess");
    $savedChanges = str_replace("/%url%/", $rewriteBase, $htaccess);
    $writeHtaccess = fopen(".htaccess", "w");
    fwrite($writeHtaccess, $savedChanges);
    fclose($writeHtaccess);
    // Redirect for install done
    Swifost::redirect("index.php?install=ready");
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Swifost &#8250; Installation</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="<?php 
Swifost::go(Swifost::AUTHOR);
?>
"/>
    <meta name="description" content="<?php 
Swifost::go(Swifost::SOFTWARE . " is " . Swifost::DESCRIPTION);
?>
Пример #2
0
 /**
  * Runnig aplication Swifost (config, install sucess)
  *
  * @example Swifost::push()->ready("config.php", install.php", "index.php", "install", "ready");
  *
  * @access  public
  * @param  string $fileConfig, $fileInstall, $redirect, $param and $result
  *
  */
 public function ready($fileConfig, $fileInstall, $redirect, $param, $result)
 {
     if (file_exists($fileInstall)) {
         if (isset($_GET[$param]) && $_GET[$param] == $result) {
             // Try to delete install file if not DELETE MANUALLY !!!
             @unlink($fileInstall);
             // Redirect to main page
             Swifost::redirect($redirect);
         } else {
             include $fileInstall;
         }
     } else {
         // Run Swifost Application
         self::push()->run($fileConfig);
     }
 }