本文整理汇总了PHP中owa_coreAPI::generateInstanceSpecificHash方法的典型用法代码示例。如果您正苦于以下问题:PHP owa_coreAPI::generateInstanceSpecificHash方法的具体用法?PHP owa_coreAPI::generateInstanceSpecificHash怎么用?PHP owa_coreAPI::generateInstanceSpecificHash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类owa_coreAPI
的用法示例。
在下文中一共展示了owa_coreAPI::generateInstanceSpecificHash方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupPaths
/**
* sets the basic path settings in the config object like "public_path" / "images_url" ...
* @return void
*/
private function setupPaths()
{
//build base url
$base_url = '';
$proto = "http";
if (isset($_SERVER['HTTPS'])) {
$proto .= 's';
}
if (isset($_SERVER['SERVER_NAME'])) {
$base_url .= $proto . '://' . $_SERVER['SERVER_NAME'];
}
if (isset($_SERVER['SERVER_PORT'])) {
if ($_SERVER['SERVER_PORT'] != 80) {
$base_url .= ':' . $_SERVER['SERVER_PORT'];
}
}
// there is some plugin use case where this is needed i think. if not get rid of it.
if (!defined('OWA_PUBLIC_URL')) {
define('OWA_PUBLIC_URL', '');
}
// set base url
$this->set('base', 'base_url', $base_url);
//set public path if not defined in config file
$public_path = $this->get('base', 'public_path');
if (empty($public_path)) {
$public_path = OWA_PATH . '/public/';
$this->set('base', 'public_path', $public_path);
}
// set various paths
$public_url = $this->get('base', 'public_url');
$main_url = $public_url . 'index.php';
$this->set('base', 'main_url', $main_url);
$this->set('base', 'main_absolute_url', $main_url);
$modules_url = $public_url . 'modules/';
$this->set('base', 'modules_url', $modules_url);
$this->set('base', 'action_url', $public_url . 'action.php');
$this->set('base', 'images_url', $modules_url);
$this->set('base', 'images_absolute_url', $modules_url);
$this->set('base', 'log_url', $public_url . 'log.php');
$this->set('base', 'api_url', $public_url . 'api.php');
$this->set('base', 'error_log_file', OWA_DATA_DIR . 'logs/errors_' . owa_coreAPI::generateInstanceSpecificHash() . '.txt');
$this->set('base', 'async_log_dir', OWA_DATA_DIR . 'logs/');
owa_coreAPI::debug('check for http host');
// Set cookie domain
if (!empty($_SERVER['HTTP_HOST'])) {
$this->setCookieDomain();
}
}