当前位置: 首页>>代码示例>>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;未经允许,请勿转载。