当前位置: 首页>>代码示例>>PHP>>正文


PHP Installer::create_database方法代码示例

本文整理汇总了PHP中Installer::create_database方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::create_database方法的具体用法?PHP Installer::create_database怎么用?PHP Installer::create_database使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Installer的用法示例。


在下文中一共展示了Installer::create_database方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: flush

 // Only pertinent if mirroring another installation directory
 if (!empty($installer->source_site_id)) {
     echo "Creating site directory...";
     if (!$installer->create_site_directory()) {
         echo $installer->error_message;
         break;
     } else {
         echo "OK.<BR>";
         flush();
     }
 }
 // Skip below if database shell has already been created.
 if ($inst != 2) {
     echo "Creating database...\n";
     flush();
     if (!$installer->create_database()) {
         echo "ERROR.  Check your login credentials.\n";
         echo $installer->error_message;
         break;
     } else {
         echo "OK.<br>\n";
         flush();
     }
     echo "Creating user with permissions for database...\n";
     flush();
     if (!$installer->grant_privileges()) {
         echo "ERROR when granting privileges to the specified user.\n";
         echo $installer->error_message;
         break;
     } else {
         echo "OK.<br>\n";
开发者ID:katopenzz,项目名称:openemr,代码行数:31,代码来源:setup.php

示例2: _e

						<input type="submit" class="btn btn-primary" name="start" value="<?php 
    _e('Start install', 'luna');
    ?>
" />
					</div>
				</div>
			</form>
		</div>
	</body>
</html>
<?php 
} else {
    // Enable/disable avatars depending on file_uploads setting in PHP configuration
    $avatars = in_array(strtolower(@ini_get('file_uploads')), array('on', 'true', '1'));
    // Create the tables
    $db = Installer::create_database($db_type, $db_host, $db_name, $db_username, $db_password, $db_prefix, $title, $description, $default_lang, $default_style, $email, $avatars, $base_url);
    // Insert some other default data
    Installer::insert_default_groups();
    // groups
    Installer::insert_default_users($username, $password1, $email, $default_lang, $default_style);
    // users
    Installer::instert_default_menu();
    // menus
    Installer::insert_default_data();
    // other stuff, like ranks
    $alerts = array();
    // Check if we disabled uploading avatars because file_uploads was disabled
    if (!$avatars) {
        $alerts[] = __('<strong>File uploads appear to be disallowed on this server!</strong> If you want users to be able to upload their own avatar images you must enable the file_uploads configuration setting in PHP. Once file uploads have been enabled, avatar uploads can be enabled in Administration/Options/Features.', 'luna');
    }
    // Generate the config.php file data
开发者ID:istrwei,项目名称:Luna,代码行数:31,代码来源:install.php


注:本文中的Installer::create_database方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。