1.准备工作
安装php,并已经配置好环境变量path
2.运行hardware.sh获取机器码
shell> php ./hardware.sh
3.脚本内容
#!/usr/bin/env php
<?php
function command_hardware()
{
if(function_exists('zend_loader_enabled') && zend_loader_enabled())
{
foreach (zend_get_id() as $hardware) {
echo $hardware, "\n";
}
} else {
echo 'zend guard loader not installed or not enabled!';
exit;
}
}
command_hardware();