本文整理匯總了PHP中Install::installPossible方法的典型用法代碼示例。如果您正苦於以下問題:PHP Install::installPossible方法的具體用法?PHP Install::installPossible怎麽用?PHP Install::installPossible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Install
的用法示例。
在下文中一共展示了Install::installPossible方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: catch
}
if (isset($config->database->adapterName)) {
Zend_Db_Table::setDefaultAdapter(Zend_Db::factory($config->database->adapterName, $config->database->options->toArray()));
Zend_Db_Table::getDefaultAdapter()->getProfiler()->setEnabled(true);
USVN_Db_Table::$prefix = $config->database->prefix;
}
Zend_Registry::set('config', $config);
} catch (Exception $e) {
}
}
USVN_Translation::initTranslation($GLOBALS['language'], USVN_LOCALE_DIRECTORY);
$installSteps = array(1 => 'System Check', 2 => 'Language Selection', 3 => 'License Agreement', 4 => 'USVN Configuration', 5 => 'Database Installation', 6 => 'Administrator User Creation', 7 => 'Check for a Newer Version', 8 => 'Installation is over');
//------------------------------------------------------------------------------------------------
include 'views/head.html';
try {
$install_is_possible = Install::installPossible(USVN_CONFIG_FILE);
} catch (USVN_Exception $e) {
displayError($e->getMessage());
include 'views/footer.html';
exit(0);
}
if ($install_is_possible) {
if (!isset($_GET['step'])) {
$step = 0;
} else {
$step = $_GET['step'];
}
try {
installationOperation($step);
} catch (USVN_Exception $e) {
displayError($e->getMessage());
示例2: foreach
break;
case '-d':
case '--database-path':
$options['database-path'] = $argv[++$i];
break;
}
}
foreach ($mandatory_options as $mandatory_option) {
if (!array_key_exists($mandatory_option, $options) || empty($options[$mandatory_option])) {
echo 'Error: "' . $mandatory_option . '" is a mandatory option, and it was not specified.' . "\n";
echo 'Aborting.' . "\n";
exit(1);
}
}
try {
if (!Install::installPossible(USVN_CONFIG_FILE)) {
echo 'Error: USVN is already installed.' . "\n";
echo 'Aborting.' . "\n";
exit(1);
}
USVN_Translation::initTranslation($GLOBALS['language'], USVN_APP_DIR . '/locale');
$config = new USVN_Config_Ini($options['config-file'], USVN_CONFIG_SECTION);
Zend_Registry::set('config', $config);
/*
* Those "echo"s are ugly, but anonymous functions are only available in PHP since versions >= 5.3.0 :(
* It would have been nice to be able to do:
*
* installation_configure('site settings', function()
* {
* Install::installConfiguration(USVN_CONFIG_FILE, $config->site->title);
* });