Exemplo n.º 1
0
define('HOMEPAGE', 'https://github.com/Alorel/AloWAMP');
/**
 * Shortcut for isset($var) ? $var : null
 *
 * @author Art <*****@*****.**>
 *
 * @param mixed $var Reference to the variable
 *
 * @return mixed|null The variable or NULL if it's not defined
 */
function get(&$var)
{
    return isset($var) ? $var : null;
}
/**
 * Output wapper
 *
 * @author Art <*****@*****.**>
 *
 * @param string $str String to echo
 */
function _echo($str)
{
    echo '[' . date('Y-m-d H:i:s') . '] ' . $str . PHP_EOL;
}
require_once DIR_CORE . 'class' . DIRECTORY_SEPARATOR . 'handler.php';
spl_autoload_register('Handler::autoloader');
IO::echo_lines();
new Settings();
$r = new Router();
$r->route();
Exemplo n.º 2
0
<?php

$setup = new Setup();
_echo('Hi! I will guide you through the setup.' . PHP_EOL . 'First, let\'s check if you have some of the core directories present.');
IO::echo_lines(2);
$setup->checkDateTimezone()->checkDir(DIR_TMP, 'tmp folder')->checkDir(DIR_BIN, 'binaries folder')->checkDir(DIR_LOGS . 'php' . DIRECTORY_SEPARATOR, 'PHP log folder')->checkDir(DIR_LOGS . 'apache' . DIRECTORY_SEPARATOR, 'Apache log folder')->checkDir(DIR_LOGS . 'mysql' . DIRECTORY_SEPARATOR, 'MySQL log folder')->checkDir(DIR_LOGS . 'redis' . DIRECTORY_SEPARATOR, 'Redis log folder')->checkWWW()->checkPHP()->checkApache()->checkMySQL()->checkRedis()->checkMemcache();