<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>MAC search</title>
</head>
<body align="middle" bgcolor="gray">
<h1><font size="20" face="Verdana" color="blue">MAC search</font></h1>
<form action="" method="post">
MAC:
<input type="text" name="mac" size="20"/>
<input type="submit" value="submit"/>
</form>
<?php
if(isset($_POST['mac'])&&$_POST['mac']!=''){
$output = shell_exec("macsearch $mac");
echo "$output";
}
?>
</body>
</html>
分析如下:
补充:今天遇到一个问题,通过php页面执行这个脚本的时候无效,macsearch脚本中的wget命令未执行(macsearch脚本在博文《字符串按位数分隔》中有)
来源:博客园
作者:ashaff
链接:https://www.cnblogs.com/ashaff/p/11435568.html