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


PHP ConfigFile::open方法代碼示例

本文整理匯總了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(['', '']);
開發者ID:nuQuery,項目名稱:v1m0-api-install,代碼行數:31,代碼來源:install.php


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