本文整理汇总了PHP中OSC\OM\OSCOM::configExists方法的典型用法代码示例。如果您正苦于以下问题:PHP OSCOM::configExists方法的具体用法?PHP OSCOM::configExists怎么用?PHP OSCOM::configExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSC\OM\OSCOM
的用法示例。
在下文中一共展示了OSCOM::configExists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: microtime
*
* @copyright (c) 2016 osCommerce; https://www.oscommerce.com
* @license MIT; https://www.oscommerce.com/license/mit.txt
*/
use OSC\OM\HTTP;
use OSC\OM\OSCOM;
use OSC\OM\Registry;
// start the timer for the page parse time log
define('PAGE_PARSE_START_TIME', microtime());
define('OSCOM_BASE_DIR', __DIR__ . '/OSC/');
// set the level of error reporting
error_reporting(E_ALL & ~E_DEPRECATED);
require OSCOM_BASE_DIR . 'OM/OSCOM.php';
spl_autoload_register('OSC\\OM\\OSCOM::autoload');
OSCOM::initialize();
if (!OSCOM::configExists('db_server') || strlen(OSCOM::getConfig('db_server')) < 1) {
if (is_dir('install')) {
header('Location: install/index.php');
exit;
}
}
if (PHP_VERSION_ID < 70000) {
include 'includes/third_party/random_compat/random.php';
}
require 'includes/functions/general.php';
require 'includes/classes/shopping_cart.php';
require 'includes/classes/navigation_history.php';
require 'includes/classes/currencies.php';
require 'includes/classes/action_recorder.php';
require 'includes/classes/alertbox.php';
require 'includes/classes/message_stack.php';
示例2: autoPrefixTables
protected function autoPrefixTables($statement)
{
$prefix = '';
if (isset($this->table_prefix)) {
$prefix = $this->table_prefix;
} elseif (OSCOM::configExists('db_table_prefix')) {
$prefix = OSCOM::getConfig('db_table_prefix');
}
$statement = str_replace(':table_', $prefix, $statement);
return $statement;
}
示例3: setTimeZone
public static function setTimeZone($time_zone = null)
{
if (!isset($time_zone)) {
$time_zone = OSCOM::configExists('time_zone') ? OSCOM::getConfig('time_zone') : date_default_timezone_get();
}
return date_default_timezone_set($time_zone);
}