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


PHP OS::__construct方法代码示例

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


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

示例1: __construct

 /**
  * build the global Error object and create the WMI connection
  */
 public function __construct()
 {
     parent::__construct();
     // don't set this params for local connection, it will not work
     $strHostname = '';
     $strUser = '';
     $strPassword = '';
     // initialize the wmi object
     $objLocator = new COM('WbemScripting.SWbemLocator');
     if ($strHostname == "") {
         $this->_wmi = $objLocator->ConnectServer();
     } else {
         $this->_wmi = $objLocator->ConnectServer($strHostname, 'rootcimv2', $strHostname . '\\' . $strUser, $strPassword);
     }
     $this->_getCodeSet();
 }
开发者ID:alexborisov,项目名称:foxfire,代码行数:19,代码来源:class.WINNT.inc.php

示例2: __construct

 /**
  * build the global Error object and create the WMI connection
  */
 public function __construct()
 {
     parent::__construct();
     // don't set this params for local connection, it will not work
     $strHostname = '';
     $strUser = '';
     $strPassword = '';
     try {
         // initialize the wmi object
         $objLocator = new COM('WbemScripting.SWbemLocator');
         if ($strHostname == "") {
             $this->_wmi = $objLocator->ConnectServer();
         } else {
             $this->_wmi = $objLocator->ConnectServer($strHostname, 'rootcimv2', $strHostname . '\\' . $strUser, $strPassword);
         }
     } catch (Exception $e) {
         $this->error->addError("WMI connect error", "PhpSysInfo can not connect to the WMI interface for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed.");
     }
     $this->_getCodeSet();
 }
开发者ID:caglaroflazoglu,项目名称:sentora-core,代码行数:23,代码来源:class.WINNT.inc.php

示例3: __construct

 /**
  * call parent constructor
  */
 public function __construct()
 {
     parent::__construct();
 }
开发者ID:jhbsz,项目名称:ossimTest,代码行数:7,代码来源:class.BSDCommon.inc.php

示例4: __construct

 /**
  * call parent constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->error->addError("WARN", "The Minix version of phpSysInfo is work in progress, some things currently don't work");
 }
开发者ID:sorrowchen,项目名称:openfiler-cn,代码行数:8,代码来源:class.Minix.inc.php


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