本文整理汇总了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();
}
示例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();
}
示例3: __construct
/**
* call parent constructor
*/
public function __construct()
{
parent::__construct();
}
示例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");
}