本文整理匯總了PHP中Server::isLocalServer方法的典型用法代碼示例。如果您正苦於以下問題:PHP Server::isLocalServer方法的具體用法?PHP Server::isLocalServer怎麽用?PHP Server::isLocalServer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server
的用法示例。
在下文中一共展示了Server::isLocalServer方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: generateWebmasterTools
public static function generateWebmasterTools()
{
$google=array();
$google['webmasterTools']=Configuration::getInstance()->get('Google', 'webmasterTools');
$theme = Configuration::getInstance()->get('Design', 'theme');
$tp = new templateParser(PATH."FrontEnd/".$theme."/snippets/google_webmaster_tools.htm");
if (Server::isLocalServer())
return "";
if (empty($google['webmasterTools']))
return '';
else
{
$tp->parseTemplate($google);
return $tp->display();
}
}
示例2: __construct
public function __construct()
{
/*
$this->host='db523.1und1.de';
$this->user='dbo155195156';
$this->passwd='NHEhYC9g';
$this->dbname='db155195156';
*/
$conf = Configuration::getInstance();
if (Server::isLocalServer()) {
$this->host = $conf->get('Database', 'LocalHost');
$this->user = $conf->get('Database', 'LocalUser');
$this->passwd = $conf->get('Database', 'LocalPasswd');
$this->dbname = $conf->get('Database', 'LocalDB');
$this->DBMS = $conf->get('Database', 'LocalDBMS');
$this->locktable = $conf->get('Database', 'LocalLockTable');
} else {
$this->host = $conf->get('Database', 'RemoteHost');
$this->user = $conf->get('Database', 'RemoteUser');
$this->passwd = $conf->get('Database', 'RemotePasswd');
$this->dbname = $conf->get('Database', 'RemoteDB');
$this->DBMS = $conf->get('Database', 'RemoteDBMS');
$this->locktable = $conf->get('Database', 'RemoteLockTable');
}
//$this->dbname='avaris_19_9_06';
//Data for the Article-Tables
$config = Configuration::getInstance(); //10.04.2007 MG
$this->prefix = $config->get('Database', 'DBPrefix'); //10.04.2007 MG
$this->articleTable = $this->prefix . 'articles'; //10.04.2007 MG
$this->descriptionTable = $this->prefix . 'article_descriptions'; //10.04.2007 MG
$this->parentIDTable = $this->prefix . 'article_to_parent_ids'; //10.04.2007 MG
$this->archiveTable = $this->prefix . 'article_archive';
}
示例3: __construct
public function __construct()
{
$this->data['lokal'] = Server::isLocalServer() ? 'LOKAL ' : '';
$this->data['navi_local_remote'] = Server::isLocalServer() ? 'local_navi' : 'navi';
}