当前位置: 首页>>代码示例>>PHP>>正文


PHP OS_Guess::getSysname方法代码示例

本文整理汇总了PHP中OS_Guess::getSysname方法的典型用法代码示例。如果您正苦于以下问题:PHP OS_Guess::getSysname方法的具体用法?PHP OS_Guess::getSysname怎么用?PHP OS_Guess::getSysname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OS_Guess的用法示例。


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

示例1: getsysname

 /**
  * This makes unit-testing a heck of a lot easier
  */
 function getsysname()
 {
     return $this->_os->getSysname();
 }
开发者ID:upmunspel,项目名称:abiturient,代码行数:7,代码来源:Dependency2.php

示例2:

 /** 
  * Resolve the system name
  *
  * @access private
  */
 function _setSystemName()
 {
     $OS_Guess = new OS_Guess();
     $sysname = $OS_Guess->getSysname();
     /* Nasty hack for Debian, as it uses a custom ping version */
     if ('linux' == $sysname) {
         if (file_exists('/etc/debian_version')) {
             $sysname = 'debian';
         }
     }
     return $sysname;
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:17,代码来源:Ping.php

示例3: factory

 /**
  * Factory for Net_Traceroute
  *
  * Call this method to create a new instance of Net_Traceroute
  *
  * @return object Net_Traceroute
  * @access public
  */
 function factory()
 {
     $OS_Guess = new OS_Guess();
     $sysname = $OS_Guess->getSysname();
     $traceroute_path = '';
     if (($traceroute_path = Net_Traceroute::_setTraceroutePath($sysname)) == NET_TRACEROUTE_CANT_LOCATE_TRACEROUTE_BINARY) {
         return PEAR::throwError(NET_TRACEROUTE_CANT_LOCATE_TRACEROUTE_BINARY_MSG, NET_TRACEROUTE_CANT_LOCATE_TRACEROUTE_BINARY);
     } else {
         return new Net_Traceroute($traceroute_path, $sysname);
     }
 }
开发者ID:Evolix,项目名称:lilac,代码行数:19,代码来源:Traceroute.php

示例4: elseif

 /** 
  * Resolve the system name
  *
  * @access private
  */
 function _setSystemName()
 {
     $OS_Guess = new OS_Guess();
     $sysname = $OS_Guess->getSysname();
     // Refine the sysname for different Linux bundles/vendors. (This
     // should go away if OS_Guess was ever extended to give vendor
     // and vendor-version guesses.)
     //
     // Bear in mind that $sysname is eventually used to craft a
     // method name to figure out which backend gets used to parse
     // the ping output. Elsewhere, we'll set $sysname back before
     // that.
     if ('linux' == $sysname) {
         if (file_exists('/etc/lsb-release') && false !== ($release = @file_get_contents('/etc/lsb-release')) && preg_match('/gutsy/i', $release)) {
             $sysname = 'linuxredhat9';
         } else {
             if (file_exists('/etc/debian_version')) {
                 $sysname = 'linuxdebian';
             } else {
                 if (file_exists('/etc/redhat-release') && false !== ($release = @file_get_contents('/etc/redhat-release'))) {
                     if (preg_match('/release 8/i', $release)) {
                         $sysname = 'linuxredhat8';
                     } elseif (preg_match('/release 9/i', $release)) {
                         $sysname = 'linuxredhat9';
                     }
                 }
             }
         }
     }
     return $sysname;
 }
开发者ID:altesien,项目名称:FinalProject,代码行数:36,代码来源:Ping.php

示例5:

 /**
  * Constructor; initializes the system variable.
  */
 function System_Folders()
 {
     $og = new OS_Guess();
     $this->sys = $og->getSysname();
 }
开发者ID:altesien,项目名称:FinalProject,代码行数:8,代码来源:Folders.php

示例6: htmlspecialchars

 * building document type declaration
 */
print 'building DocType declaration:<br>';
print htmlspecialchars(XML_Util::getDocTypeDeclaration('package', 'http://pear.php.net/dtd/package-1.0'));
print "\n<br><br>\n";
$modes = mcrypt_list_modes();
echo "mcrypt_list_modes <br>\n";
echo print_r_xml($modes);
//F:\bit5411\php\PEAR\OS\Guess.php  class OS_Guess
require_once 'OS/Guess.php';
$phpwhat = new OS_Guess();
//$phpwhat = OS_Guess::getSignature();  //fatal this
$tmp = $phpwhat->getSignature();
echo $tmp;
echo PHP_EOL;
$tmp = $phpwhat->getSysname();
echo $tmp;
echo PHP_EOL;
$tmp = $phpwhat->getNodename();
echo $tmp;
echo PHP_EOL;
$tmp = $phpwhat->getCpu();
echo $tmp;
echo PHP_EOL;
$tmp = $phpwhat->getRelease();
echo $tmp;
echo PHP_EOL;
$tmp = $phpwhat->getExtra();
echo $tmp;
echo PHP_EOL;
echo php_uname();
开发者ID:gmgj,项目名称:gjsoap,代码行数:31,代码来源:gjrsi.php


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