本文整理汇总了PHP中ConfigFile::open方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigFile::open方法的具体用法?PHP ConfigFile::open怎么用?PHP ConfigFile::open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigFile
的用法示例。
在下文中一共展示了ConfigFile::open方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_table
create_table($G_TRACKING_DBLINK, $query, $G_OUTPUT_RESULTS);
# storage_files_size table
$query = "\tCREATE TABLE IF NOT EXISTS " . NQ_TRACKING_DATABASE . ".`" . NQ_TRACKING_TABLE_PREFIX . "storage_files_size`\n\t\t\t\t\t\t(\n\t\t \t\t\t\t\t`app_id` int(10) unsigned NOT NULL, \n\t\t \t\t\t\t\t`live_file_size` bigint(20) unsigned NOT NULL, \n\t\t \t\t\t\t\t`version_file_size` bigint(20) unsigned NOT NULL, \n\t\t \t\t\t\t\t`created` datetime NOT NULL, \n\t\t \t\t\t\t\tUNIQUE KEY `app_created` (`app_id`, `created`)\n\t\t \t\t\t\t)\n\t\t \t\t\tENGINE = InnoDB DEFAULT CHARSET = latin1;";
create_table($G_TRACKING_DBLINK, $query, $G_OUTPUT_RESULTS);
# storage_images_size table
$query = "\tCREATE TABLE IF NOT EXISTS " . NQ_TRACKING_DATABASE . ".`" . NQ_TRACKING_TABLE_PREFIX . "storage_images_size`\n\t\t\t\t\t\t(\n\t\t \t\t\t\t\t`app_id` int(10) unsigned NOT NULL, \n\t\t \t\t\t\t\t`live_file_size` bigint(20) unsigned NOT NULL, \n\t\t \t\t\t\t\t`version_file_size` bigint(20) unsigned NOT NULL, \n\t\t \t\t\t\t\t`created` datetime NOT NULL, \n\t\t \t\t\t\t\tUNIQUE KEY `app_created` (`app_id`, `created`)\n\t\t \t\t\t\t)\n\t\t \t\t\tENGINE = InnoDB DEFAULT CHARSET = latin1;";
create_table($G_TRACKING_DBLINK, $query, $G_OUTPUT_RESULTS);
}
# Adding the app support files
if (in_array($_POST['install-mode'], ['simple', 'advanced']) && isset($_POST['template_install']) && $_POST['template_install'] != '') {
# Gitgub header
create_header('Configuration', $G_OUTPUT_RESULTS);
# Logging
$G_OUTPUT_RESULTS[] = ' - Starting the config file.<br />';
# Opening the config file
ConfigFile::open();
# Config for single files
if ($_POST['install-mode'] == 'simple') {
# API Key and Secret
if ($_POST['app_config_app_id'] != '' || $_POST['app_config_app_secret'] != '') {
ConfigFile::write('# App Credentials');
ConfigFile::write("define( 'NQ_APP_ID', '" . $_POST['app_config_app_id'] . "' );");
ConfigFile::write("define( 'NQ_APP_SECRET', '" . $_POST['app_config_app_secret'] . "' );");
ConfigFile::write(['', '']);
}
# Writing the caching properties
ConfigFile::write('# Caching Properties');
ConfigFile::write("define( 'NQ_PRODUCTION_MODE', false );");
ConfigFile::write("define( 'NQ_CACHE_MEMCACHED', false );");
ConfigFile::write("define( 'NQ_CACHE_MEMCACHED_HOSTS', 'localhost' );");
ConfigFile::write(['', '']);