本文整理汇总了PHP中DBG::set_adodb_debug_mode方法的典型用法代码示例。如果您正苦于以下问题:PHP DBG::set_adodb_debug_mode方法的具体用法?PHP DBG::set_adodb_debug_mode怎么用?PHP DBG::set_adodb_debug_mode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBG
的用法示例。
在下文中一共展示了DBG::set_adodb_debug_mode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
global $_CORELANG, $objDatabase;
@header('content-type: text/html; charset=' . (UPDATE_UTF8 ? 'utf-8' : 'iso-8859-1'));
$this->_loadLanguage();
$this->objTemplate = new HTML_Template_Sigma(UPDATE_TPL);
$this->objTemplate->setErrorHandling(PEAR_ERROR_DIE);
$this->objTemplate->loadTemplateFile('index.html');
$this->objTemplate->setGlobalVariable(array('TXT_UPDATE_CONTREXX_UPDATE_SYSTEM' => $_CORELANG['TXT_UPDATE_CONTREXX_UPDATE_SYSTEM'], 'UPDATE_TPL_PATH' => UPDATE_TPL, 'CHARSET' => UPDATE_UTF8 ? 'utf-8' : 'iso-8859-1', 'JAVASCRIPT' => 'javascript_inserting_here'));
$this->objDatabase = Env::get('db');
DBG::set_adodb_debug_mode();
if (!empty($_REQUEST['ajax'])) {
$this->ajax = true;
if (!@(include_once UPDATE_LIB . '/PEAR/Services/JSON.php')) {
die('Unable to load the PEAR JSON library: ' . UPDATE_LIB . '/PEAR/Services/JSON.php');
}
$this->objJson = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$this->parseJsonRequest();
}
}
示例2: init
/**
* Loading ClassLoader, EventManager, Env, DB, API and InitCMS
* (Env, API and InitCMS are deprecated)
* @todo Remove deprecated elements
* @todo Remove usage of globals
* @global array $_CONFIG
* @global type $_FTPCONFIG
* @global type $objDatabase
* @global type $objInit
*/
protected function init()
{
global $objDatabase, $objInit, $_DBCONFIG, $_CONFIG;
$this->tryToSetMemoryLimit();
/**
* Include all the required files.
* @todo Remove API.php, it should be unnecessary
*/
$this->cl->loadFile($this->codeBaseCorePath . '/API.php');
// Temporary fix until all GET operation requests will be replaced by POSTs
if ($this->mode != self::MODE_BACKEND) {
\Cx\Core\Csrf\Controller\Csrf::setFrontendMode();
}
// Set database connection details
$objDb = new \Cx\Core\Model\Model\Entity\Db();
$objDb->setHost($_DBCONFIG['host']);
$objDb->setName($_DBCONFIG['database']);
$objDb->setTablePrefix($_DBCONFIG['tablePrefix']);
$objDb->setDbType($_DBCONFIG['dbType']);
$objDb->setCharset($_DBCONFIG['charset']);
$objDb->setCollation($_DBCONFIG['collation']);
$objDb->setTimezone($_DBCONFIG['timezone']);
// Set database user details
$objDbUser = new \Cx\Core\Model\Model\Entity\DbUser();
$objDbUser->setName($_DBCONFIG['user']);
$objDbUser->setPassword($_DBCONFIG['password']);
// Initialize database connection
$this->db = new \Cx\Core\Model\Db($objDb, $objDbUser, $this->getComponent('Cache')->getCacheDriver());
$objDatabase = $this->db->getAdoDb();
\Env::set('db', $objDatabase);
$em = $this->db->getEntityManager();
\Env::set('pageguard', new \PageGuard($this->db->getAdoDb()));
\DBG::set_adodb_debug_mode();
$this->eventManager = new \Cx\Core\Event\Controller\EventManager($this);
new \Cx\Core\Event\Controller\ModelEventWrapper($this);
$this->eventManager->addEvent('preComponent');
$this->eventManager->addEvent('postComponent');
// Initialize base system
// TODO: Get rid of InitCMS class, merge it with this class instead
$objInit = new \InitCMS($this->mode == self::MODE_FRONTEND ? 'frontend' : 'backend', \Env::get('em'));
\Env::set('init', $objInit);
//$bla = $em->getRepository('Cx\Core\ContentManager\Model\Entity\Page');
//$bla->findAll();
}