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


PHP I2CE::initialize方法代碼示例

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


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

示例1: array_shift

 * as well as the path to I2CE which may not work right using the one
 * from the config file.
 * The ID for the User object should be valid in your user table.
 * The $forms array is an associative array with the value being
 * an array of forms that are required for the given form to work e.g. 
 * region needs country first since it uses country as a map for a field.
 */
$script = array_shift($argv);
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pages/local' . DIRECTORY_SEPARATOR . 'config.values.php')) {
    require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pages/local' . DIRECTORY_SEPARATOR . 'config.values.php';
} else {
    require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pages/config.values.php';
}
$i2ce_site_i2ce_path = "../../I2CE";
require_once $i2ce_site_i2ce_path . DIRECTORY_SEPARATOR . 'I2CE_config.inc.php';
I2CE::initialize($i2ce_site_database_user, $i2ce_site_database_password, $i2ce_site_database, $i2ce_site_user_database, $i2ce_site_module_config);
global $maps, $forms, $user, $db, $form_factory;
$maps = array();
$user = new I2CE_User(1);
$db = MDB2::singleton();
$form_factory = I2CE_FormFactory::instance();
$forms = array("academic_level" => array(), "certificate" => array("academic_level"), "qualification" => array(), "cadre" => array("qualification"), "country" => array(), "region" => array("country"), "district" => array("region"), "county" => array("district"), "marital_status" => array(), "training_disruption_category" => array(), "training_disruption_reason" => array("training_disruption_category"), "facility_agent" => array(), "facility_type" => array(), "out_migration_reason" => array(), "tribe" => array(), "facility_status" => array(), "health_facility" => array("facility_agent", "facility_type", "facility_status"));
echo "Memory Limit: " . ini_get("memory_limit") . "\n";
echo "Execution Time: " . ini_get("max_execution_time") . "\n";
$cache_filename = "convert_maps.save";
if (file_exists($cache_filename)) {
    echo "Reading saved maps file...";
    $cache_file = fopen($cache_filename, "r");
    $cache_content = fread($cache_file, filesize($cache_filename));
    fclose($cache_file);
    $maps = unserialize($cache_content);
開發者ID:apelon-ohie,項目名稱:ihris-site,代碼行數:31,代碼來源:convertDB.php


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