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


PHP connect::connectToDB方法代碼示例

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


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

示例1: Anthony

#  / __\ __ __ _ / _| |_ ___  __| / / /\ \ \___| |__
# / / | '__/ _` | |_| __/ _ \/ _` \ \/  \/ / _ \ '_ \
#/ /__| | | (_| |  _| ||  __/ (_| |\  /\  /  __/ |_) |
#\____/_|  \__,_|_|  \__\___|\__,_| \/  \/ \___|_.__/
#
#		-[ Created by �Nomsoft
#		  `-[ Original core by Anthony (Aka. CraftedDev)
#
#				-CraftedWeb Generation II-
#			 __                           __ _
#		  /\ \ \___  _ __ ___  ___  ___  / _| |_
#		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|
#		/ /\  / (_) | | | | | \__ \ (_) |  _| |_
#		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -
#                  The policy of Nomsoftware states: Releasing our software
#                  or any other files are protected. You cannot re-release
#                  anywhere unless you were given permission.
#                  � Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.
//This file exists just to clear some space from all the /scripts files.
session_start();
define('INIT_SITE', TRUE);
//Init config
require '../configuration.php';
require '../misc/connect.php';
require '../misc/func_lib.php';
require '../classes/account.php';
require '../classes/website.php';
require '../classes/character.php';
require '../classes/server.php';
connect::connectToDB();
開發者ID:nero08,項目名稱:CraftedWeb,代碼行數:30,代碼來源:ext_scripts_class_loader.php

示例2: header

require 'includes/configuration.php';
//Load configuration file
if (isset($GLOBALS['not_installed']) && $GLOBALS['not_installed'] == true) {
    if (file_exists('install/index.php')) {
        header("Location: install/index.php");
    } else {
        exit('<b>Error</b>. It seems like your website is not yet installed, but no installer could be found!');
    }
}
if ($GLOBALS['maintainance'] == TRUE && !in_array($_SERVER['REMOTE_ADDR'], $GLOBALS['maintainance_allowIPs'])) {
    die("<center><h3>Website Maintainance</h3>\r\n      " . $GLOBALS['website_title'] . " is currently undergoing some major maintainance and will be available as soon as possible.\r\n      <br/><br/>Sincerely\r\n  </center>");
}
require 'includes/misc/connect.php';
//Load connection class
$connect = new connect();
$connect->connectToDB();
require 'includes/misc/func_lib.php';
require 'includes/misc/compress.php';
require 'includes/classes/account.php';
require 'includes/classes/server.php';
require 'includes/classes/website.php';
require 'includes/classes/shop.php';
require 'includes/classes/character.php';
require 'includes/classes/cache.php';
require 'includes/classes/plugins.php';
/******* LOAD PLUGINS ***********/
plugins::globalInit();
plugins::init('classes');
plugins::init('javascript');
plugins::init('modules');
plugins::init('styles');
開發者ID:nero08,項目名稱:CraftedWeb,代碼行數:31,代碼來源:loader.php


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