當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Install::checkAllRequirements方法代碼示例

本文整理匯總了PHP中Install::checkAllRequirements方法的典型用法代碼示例。如果您正苦於以下問題:PHP Install::checkAllRequirements方法的具體用法?PHP Install::checkAllRequirements怎麽用?PHP Install::checkAllRequirements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Install的用法示例。


在下文中一共展示了Install::checkAllRequirements方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: phpinfo

$action = Misc::findSubmitButton();
switch ($action) {
    case 'phpinfo':
        phpinfo();
        exit;
        break;
    case 'back':
        Debug::Text('Back', __FILE__, __LINE__, __METHOD__, 10);
        Redirect::Page(URLBuilder::getURL(NULL, 'install.php'));
        break;
    case 'next':
        Debug::Text('Next', __FILE__, __LINE__, __METHOD__, 10);
        if ($external_installer == 1) {
            Redirect::Page(URLBuilder::getURL(array('external_installer' => $external_installer), 'DatabaseSchema.php'));
        } else {
            Redirect::Page(URLBuilder::getURL(NULL, 'DatabaseConfig.php'));
        }
        break;
    default:
        break;
}
$handle = @fopen('http://www.timetrex.com/' . URLBuilder::getURL(array_merge(array('v' => $install_obj->getFullApplicationVersion(), 'page' => 'require'), $install_obj->getFailedRequirements()), 'pre_install.php'), "r");
@fclose($handle);
$check_all_requirements = $install_obj->checkAllRequirements();
if ($external_installer == 1 and $check_all_requirements == 0 and $install_obj->checkTimeTrexVersion() == 0) {
    //Using external installer and there is no missing requirements, automatically send to next page.
    Redirect::Page(URLBuilder::getURL(array('external_installer' => $external_installer, 'action:next' => 'next'), $_SERVER['SCRIPT_NAME']));
}
$smarty->assign_by_ref('install_obj', $install_obj);
$smarty->assign_by_ref('external_installer', $external_installer);
$smarty->display('install/Requirements.tpl');
開發者ID:J-P-Hanafin,項目名稱:TimeTrex-1,代碼行數:31,代碼來源:Requirements.php

示例2: Install

 * $Date: 2010-07-28 14:16:05 -0700 (Wed, 28 Jul 2010) $
 */
//Allow both CLI and CGI PHP binaries to call maint scripts.
if (PHP_SAPI != 'cli' and PHP_SAPI != 'cgi' and PHP_SAPI != 'cgi-fcgi') {
    echo "This script can only be called from the Command Line.\n";
    exit;
}
if (version_compare(PHP_VERSION, 5, '<') == 1) {
    echo "You are currently using PHP v" . PHP_VERSION . " TimeTrex requires PHP v5 or greater!\n";
    exit;
}
//Allow CLI scripts to run much longer.
ini_set('max_execution_time', 7200);
//Check post install requirements, because PHP CLI usually uses a different php.ini file.
$install_obj = new Install();
if ($install_obj->checkAllRequirements(TRUE) == 1) {
    $failed_requirements = $install_obj->getFailedRequirements(TRUE);
    unset($failed_requirements[0]);
    echo "----WARNING----WARNING----WARNING-----\n";
    echo "--------------------------------------\n";
    echo "Minimum PHP Requirements are NOT met!!\n";
    echo "--------------------------------------\n";
    echo "Failed Requirements: " . implode(',', (array) $failed_requirements) . " \n";
    echo "--------------------------------------\n\n\n";
}
TTi18n::chooseBestLocale();
//Make sure a locale is set, specifically when generating PDFs.
//Uncomment the below block to force debug logging with maintenance jobs.
/*
Debug::setEnable( TRUE );
Debug::setBufferOutput( TRUE );
開發者ID:alachaum,項目名稱:timetrex,代碼行數:31,代碼來源:CLI.inc.php


注:本文中的Install::checkAllRequirements方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。