• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP version_info函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中version_info函数的典型用法代码示例。如果您正苦于以下问题:PHP version_info函数的具体用法?PHP version_info怎么用?PHP version_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了version_info函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: print_fail

    print_fail("You need to run this script as root");
}
// load config.php now
require_once 'includes/defaults.inc.php';
require_once 'config.php';
// make sure install_dir is set correctly, or the next includes will fail
if (!file_exists($config['install_dir'] . '/config.php')) {
    print_fail('$config[\'install_dir\'] is not set correctly.  It should probably be set to: ' . getcwd());
    exit;
}
// continue loading includes
require_once 'includes/definitions.inc.php';
require_once 'includes/functions.php';
require_once 'includes/common.php';
require_once $config['install_dir'] . '/includes/alerts.inc.php';
$versions = version_info();
echo "Version info:\n";
$cur_sha = $versions['local_sha'];
if ($config['update_channel'] == 'master' && $cur_sha != $versions['github']['sha']) {
    $commit_date = new DateTime($versions['local_date']);
    $commit_date->setTimezone(new DateTimeZone(date_default_timezone_get()));
    print_warn("Your install is out of date: {$cur_sha} " . $commit_date->format('(r)'));
} else {
    echo "Commit SHA: {$cur_sha}\n";
}
if ($versions['local_branch'] != 'master') {
    print_warn("Your local git branch is not master, this will prevent automatic updates.");
}
// check for modified files
$modifiedcmd = 'git diff --name-only --exit-code';
if ($username === 'root') {
开发者ID:pblasquez,项目名称:librenms,代码行数:31,代码来源:validate.php


示例2: _version

 private function _version($params)
 {
     $versions = version_info(false);
     $schema_version = $versions['db_schema'];
     $version = substr($versions['local_sha'], 0, 7);
     $msg = $this->config['project_name_version'] . ', Version: ' . $version . ', DB schema: #' . $schema_version . ', PHP: ' . PHP_VERSION;
     return $this->respond($msg);
 }
开发者ID:arrmo,项目名称:librenms,代码行数:8,代码来源:IRCBot.php


示例3: version_info

}
function version_info($proname, $subver, $ver, $supver, $reltype, $svnver, $showsvn)
{
    $return_var = $proname . " " . $reltype . " " . $subver . "." . $ver . "." . $supver;
    if ($showsvn == false) {
        $showsvn = null;
    }
    if ($showsvn == true) {
        $return_var .= " SVN " . $svnver;
    }
    if ($showsvn != true && $showsvn != null) {
        $return_var .= " " . $showsvn . " " . $svnver;
    }
    return $return_var;
}
$appversion = version_info($appname, $appver[0], $appver[1], $appver[2], $appver[3] . " Ver.", null, false);
if (!isset($_GET['redirect'])) {
    $_GET['redirect'] = "off";
}
/**
 * Returns true if $string is valid UTF-8 and false otherwise.
 *
 * @since        1.14
 * @param [mixed] $string     string to be tested
 * @subpackage
 */
function is_utf8($string)
{
    // From http://w3.org/International/questions/qa-forms-utf-8.html
    return preg_match('%^(?:
              [\\x09\\x0A\\x0D\\x20-\\x7E]            # ASCII
开发者ID:BackupTheBerlios,项目名称:idb-svn,代码行数:31,代码来源:index.php


示例4: version_info

    }
    if (isset($iDBAltName['VerCheckURL'])) {
        $Settings['VerCheckURL'] = $iDBAltName['VerCheckURL'];
    }
}
if (isset($Settings['usealtname']) && $Settings['usealtname'] == "yes") {
    $RName = $AltName2;
    $SFName = $AltName;
    $RFullName = $AltFullName;
    $VerCheckName = $AltVerCheckName;
    $UserAgentName = $AltUserAgentName;
}
$VerInfo['iDB_Ver'] = version_info($RName, $VER1[0], $VER1[1], $VER1[2], $VER2[1], $SubVerN, false);
$VerInfo['iDB_Ver_SVN'] = version_info($RName, $VER1[0], $VER1[1], $VER1[2], $VER2[1], $SubVerN, $VER2[2]);
$VerInfo['iDB_Full_Ver'] = version_info($RName, $VER1[0], $VER1[1], $VER1[2], $VER2[0], $SubVerN, false);
$VerInfo['iDB_Full_Ver_SVN'] = version_info($RName, $VER1[0], $VER1[1], $VER1[2], $VER2[0], $SubVerN, $VER2[2]);
$VerInfo['iDB_Ver_Show'] = $VerInfo['iDB_Ver_SVN'];
$VerInfo['iDB_Full_Ver_Show'] = $VerInfo['iDB_Full_Ver_SVN'];
define("_iDB_Ver_", $VerInfo['iDB_Ver']);
define("_iDB_Ver_SVN_", $VerInfo['iDB_Ver_SVN']);
define("_iDB_Full_Ver_", $VerInfo['iDB_Full_Ver']);
define("_iDB_Full_Ver_SVN_", $VerInfo['iDB_Full_Ver_SVN']);
define("_iDB_Ver_Show_", $VerInfo['iDB_Ver_Show']);
define("_iDB_Full_Ver_Show_", $VerInfo['iDB_Full_Ver_Show']);
/* 
URLs and names and stuff. :P 
$KSP = "Kazuki Sabonis Przyborowski";
$KSPAlt = "Kazuki Suzuki Przyborowski";
*/
$iDBHome = "http://ja.gamemaker2k.org/";
$iDBHome = "http://df2k.gamemaker2k.org/";
开发者ID:BackupTheBerlios,项目名称:idb-svn,代码行数:31,代码来源:versioninfo.php


示例5: chdir

 *
 * @package    observium
 * @subpackage poller
 * @author     Adam Armstrong <[email protected]>
 * @copyright  (C) 2006 - 2012 Adam Armstrong
 */
chdir(dirname($argv[0]));
require 'includes/defaults.inc.php';
require 'config.php';
require 'includes/definitions.inc.php';
require 'includes/functions.php';
require 'includes/polling/functions.inc.php';
require 'includes/alerts.inc.php';
$poller_start = microtime(true);
echo $config['project_name_version'] . " Poller\n";
$versions = version_info(false);
echo "Version info:\n";
$cur_sha = $versions['local_sha'];
echo "Commit SHA: {$cur_sha}\n";
echo "DB Schema: " . $versions['db_schema'] . "\n";
echo "PHP: " . $versions['php_ver'] . "\n";
echo "MySQL: " . $versions['mysql_ver'] . "\n";
echo "RRDTool: " . $versions['rrdtool_ver'] . "\n";
echo "SNMP: " . $versions['netsnmp_ver'] . "\n";
$options = getopt('h:m:i:n:r::d::a::f::');
if ($options['h'] == 'odd') {
    $options['n'] = '1';
    $options['i'] = '2';
} else {
    if ($options['h'] == 'even') {
        $options['n'] = '0';
开发者ID:runborg,项目名称:librenms,代码行数:31,代码来源:poller.php



注:本文中的version_info函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP version_is_unique函数代码示例发布时间:2022-05-23
下一篇:
PHP version_get_id函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap