本文整理汇总了PHP中Phpfox::getBuild方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::getBuild方法的具体用法?PHP Phpfox::getBuild怎么用?PHP Phpfox::getBuild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::getBuild方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
public function get()
{
$oFile = Phpfox::getLib('file');
$bSlaveEnabled = Phpfox::getParam(array('db', 'slave'));
$sDriver = Phpfox::getParam(array('db', 'driver'));
$aStats = array
(
Phpfox::getPhrase('admincp.phpfox_version') => PhpFox::getVersion() . '<i>(build ' . Phpfox::getBuild() . ')</i>',
Phpfox::getPhrase('admincp.php_version') => '<a href="' . Phpfox::getLib('url')->makeUrl('admincp.core.phpinfo') . '">' . PHP_VERSION . '</a>',
Phpfox::getPhrase('admincp.php_sapi') => php_sapi_name(),
Phpfox::getPhrase('admincp.php_safe_mode') => (PHPFOX_SAFE_MODE ? Phpfox::getPhrase('admincp.true') : Phpfox::getPhrase('admincp.false')),
Phpfox::getPhrase('admincp.php_open_basedir') => (PHPFOX_OPEN_BASE_DIR ? Phpfox::getPhrase('admincp.true') : Phpfox::getPhrase('admincp.false')),
Phpfox::getPhrase('admincp.php_disabled_functions') => (@ini_get('disable_functions') ? str_replace( ",", ", ", @ini_get('disable_functions') ) : Phpfox::getPhrase('admincp.none')),
Phpfox::getPhrase('admincp.php_loaded_extensions') => implode(' ', get_loaded_extensions()),
Phpfox::getPhrase('admincp.operating_system') => PHP_OS,
Phpfox::getPhrase('admincp.server_time_stamp') => date('F j, Y, g:i a', PHPFOX_TIME) . ' (GMT)',
Phpfox::getPhrase('admincp.gzip') => (Phpfox::getParam('core.use_gzip') ? Phpfox::getPhrase('admincp.enabled') : Phpfox::getPhrase('admincp.disabled')),
Phpfox::getPhrase('admincp.sql_driver_version') => ($sDriver == 'DATABASE_DRIVER' ? Phpfox::getPhrase('admincp.n_a') : Phpfox::getLib('database')->getServerInfo()),
Phpfox::getPhrase('admincp.sql_slave_enabled') => ($bSlaveEnabled ? Phpfox::getPhrase('admincp.yes') : Phpfox::getPhrase('admincp.no')),
Phpfox::getPhrase('admincp.sql_total_slaves') => ($bSlaveEnabled ? count(Phpfox::getParam(array('db', 'slave_servers'))) : Phpfox::getPhrase('admincp.n_a')),
Phpfox::getPhrase('admincp.sql_slave_server') => ($bSlaveEnabled ? Phpfox::getLib('database')->sSlaveServer : Phpfox::getPhrase('admincp.n_a')),
Phpfox::getPhrase('admincp.memory_limit') => $oFile->filesize($this->_getUsableMemory()) . ' (' . @ini_get('memory_limit') . ')',
Phpfox::getPhrase('admincp.load_balancing_enabled') => (Phpfox::getParam(array('balancer', 'enabled')) ? Phpfox::getPhrase('admincp.yes') : Phpfox::getPhrase('admincp.no'))
);
if(strpos(strtolower(PHP_OS), 'win') === 0 || PHPFOX_SAFE_MODE || PHPFOX_OPEN_BASE_DIR)
{
}
else
{
$sMemory = @shell_exec("free -m");
$aMemory = explode("\n", str_replace( "\r", "", $sMemory));
if (is_array($aMemory))
{
$aMemory = array_slice($aMemory, 1, 1);
if (isset($aMemory[0]))
{
$aMemory = preg_split("#\s+#", $aMemory[0]);
$aStats[Phpfox::getPhrase('admincp.total_server_memory')] = (isset($aMemory[1]) ? $aMemory[1] . ' MB' : '--');
$aStats[Phpfox::getPhrase('admincp.available_server_memory')] = (isset($aMemory[3]) ? $aMemory[3] . ' MB' : '--');
}
}
}
if (!PHPFOX_OPEN_BASE_DIR && ($sLoad = Phpfox::getService('core.load')->get()) !== null)
{
$aStats[Phpfox::getPhrase('admincp.current_server_load')] = $sLoad;
}
return $aStats;
}
示例2: getStaticVersion
/**
* Gets a 32 string character of the version of the static files
* on the site.
*
* @return string 32 character MD5 sum
*/
public function getStaticVersion()
{
$sVersion = md5((defined('PHPFOX_NO_CSS_CACHE') && PHPFOX_NO_CSS_CACHE || $this->_bIsTestMode === true ? PHPFOX_TIME : PhpFox::getId() . Phpfox::getBuild()) . (defined('PHPFOX_INSTALLER') ? '' : '-' . Phpfox::getParam('core.css_edit_id') . Phpfox::getBuild() . '-' . $this->_sThemeFolder . '-' . $this->_sStyleFolder));
($sPlugin = Phpfox_Plugin::get('template_getstaticversion')) ? eval($sPlugin) : false;
return $sVersion;
}
示例3: define
define('PHPFOX_NO_SESSION', true);
define('PHPFOX_NO_USER_SESSION', true);
define('PHPFOX_NO_PLUGINS', true);
// Require phpFox Init
require PHPFOX_DIR . 'include' . PHPFOX_DS . 'init.inc.php';
$sCmd = isset($_GET['cmd']) ? $_GET['cmd'] : '';
switch ($sCmd) {
case 'phpinfo':
phpinfo();
break;
case 'version':
header('Content-Type: text/xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo '<phpfox>';
echo '<version>' . Phpfox::getVersion() . '</version>';
echo '<build>' . Phpfox::getBuild() . '</build>';
echo '<package>' . Phpfox::PHPFOX_PACKAGE . '</package>';
echo '</phpfox>';
break;
case 'modules':
header('Content-Type: text/xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<phpfox>\n";
$hDir = opendir(PHPFOX_DIR_MODULE);
while ($sFolder = readdir($hDir)) {
if ($sFolder == '.' || $sFolder == '..') {
continue;
}
echo "\t<module>" . $sFolder . "</module>\n";
}
closedir($hDir);