Example #1
0
function h_tail()
{
    global $debug_mode;
    // 出力用バッファ
    $out = array();
    // 時間計測用メソッド
    if ($debug_mode) {
        $out[] = "<div id='debug' style='margin:30px 0'>" . time_ellapsed() . "</div>";
    }
    // #wrap、body, htmlを閉じる
    $out[] = "</div><!-- #wrapper --></body></html>";
    // バッファを改行コードで繋げて出力
    echo implode("\n", $out) . "\n";
}
Example #2
0
if (isset($_SERVER["HTTP_HOST"])) {
    if (preg_match("/^localhost/", $_SERVER["HTTP_HOST"])) {
        $conf_file = $conf_localhost;
    } else {
        $conf_file = "conf." . $_SERVER["HTTP_HOST"] . ".php";
    }
} else {
    $conf_file = $conf_localhost;
}
// confファイルを読み込む
require_once $conf_file;
// デバックモード指定
if ($debug_mode) {
    // debug時
    require_once $debug_script;
    time_ellapsed(microtime(true));
    // 時間計測
    ini_set("display_errors", 1);
    define("LOGIN_NO_CHECK", false);
    define("DISPLAY_ERROR_DETAIL", true);
} else {
    // ディプロイ時
    ini_set("display_errors", 0);
    define("LOGIN_NO_CHECK", false);
    define("DISPLAY_ERROR_DETAIL", false);
}
// $common_php_directoryにある.phpファイルをすべて読み込む
foreach (new DirectoryIterator(dirname(__FILE__) . "/" . $common_php_directory) as $file) {
    if ($file->getExtension() == "php") {
        require_once $file->getPathname();
    }