source code of MES Data
<HTML>
<HEAD>
<TITLE>TELOGS</TITLE>
</HEAD>
<BODY>
<?php/* command line parameters: wget "http://localhost/query.php?action=query&sn=123" -O get1.html */$act=$_GET["action"];/* http://localhost/query.php?action=query&sn=123 */if ($act == "query"){$serialnumber=$_GET["sn"];$con = mysql_connect("localhost","root","123456");if (!$con){die('Could not connect: ' . mysql_error());}mysql_select_db("test", $con);$sql = "SELECT * FROM testlogs where Serial_number='$serialnumber'";$result = mysql_query($sql);if (mysql_num_rows($result) != "0" ){while($row = mysql_fetch_array($result)){echo $row['Serial_number'] . "|" . $row['Mac_addr']."|". $row['OA_KEY']."\n";}}else{echo "No data of this serial number=".$serialnumber;}mysql_close($con);}
?><?php/* http://localhost/query.php?action=add&sn=123&mac=eeee&oakey=123 */if ($act == "add"){$serialnumber=$_GET["sn"];$macaddr=$_GET["mac"];$oakey=$_GET["oakey"];$con = mysql_connect("localhost","root","123456");if (!$con){die('Could not connect: ' . mysql_error());}mysql_select_db("test", $con);$sql="INSERT INTO testlogs (Serial_number, Mac_addr, OA_KEY) values ('$serialnumber','$macaddr','$oakey')";if(mysql_query($sql)){echo "Add data Passed";}else{echo "Add data failed";}mysql_close($con);}
?>
</BODY>
</HTML>
版权声明:本文博主原创文章。博客,未经同意不得转载。
source code of MES Data相关推荐
- Understanding The React Source Code
Understanding The React Source Code - Initial Rendering (Simple Component) I UI updating, in its ess ...
- Source Code Collection for Reproducible Research
Source Code Collection for Reproducible Research [ http://www.csee.wvu.edu/~xinl/source.html] " ...
- source code compiled install mongodb
为什么80%的码农都做不了架构师?>>> 文章来自我的博客:https://www.lwxshow.com/server/source-code-compiled-instal ...
- install mysql 5.6.22 source code
install mysql 5.6.22 source code 1.配置yum / epel 2.安装基础环境 yum -y install ntp make openssl openssl-dev ...
- IDT Source Code Running Guide(Linux+ffmpeg-0.11.1+opencv-2.4.2)
来源 :仅作翻译使用 https://blog.csdn.net/sinat_27318881/article/details/52103896#commentBox 1. ffmpeg-0.11.1 ...
- 利用MSCOMM控件通过串口MODEN实现来电显示-c# source code
利用MSCOMM控件通过串口MODEN实现来电显示-c# source code 注:此代码都已调试通过 处理方式 MSComm控件提供了两种处理通信的方式:一种为事件驱动方式,该方式相当于一般程序设 ...
- A Transformer-based Approach for Source code Summarization 翻译
A Transformer-based Approach for Source Code Summarization 全文翻译 本文最佳阅读方式:读完一段中文内容快速阅读对应的英文部分 欢迎关注我的公 ...
- Android Bluedroid source code analysis
Android Bluedroid source code analysis 图1:应用层到协议层 Android的bt整体结构如图1所示: 应用层:使用蓝牙协议的各种应用,例如:蓝牙电话.音乐等. ...
- python报错:source code string cannot contain null bytes
各位,python建数据集时报错如下,各位可有何良策,已经检查文件中没有空字符,再导入时却有. ValueError Traceback (most recent call last) in ---- ...
最新文章
- 阿里二面:如何设计与实现短URL服务?
- 在CentOS 6安装Mysql问题
- 关于flashdevelop测试flex项目时trace不出的解决方法
- Python机器人-最简单的机器人答复
- 软件行业的职位英文简称
- 51单片机(六).单片机输出电路实践——LCD1602与LCD12864的使用
- 龙芯2F笔记本安装gentoo系统
- 计算机信息管理的检索步骤,信息检索策略与步骤
- Character与char的区别
- 如何把动态硬盘转换为基本硬盘
- FPGA数字信号处理(1)- AM调制的FPGA实现
- 最新版表情包小程序源码无需服务器
- php ppt read_PHP生成PPT
- 云手机互联网点评系列-华为云手机云服务cloud+初评
- 代码质量保证体系(下)
- [Lecture 8 ] Deep Learning Software(深度学习软件)
- 一台服务器支持多个域名和站点
- VC实现二维码(qrcode)编码源码
- HDU - 5643 King's Game (约瑟夫环变式)
- 来电显示软件测试自学,用MSComm控件实现来电显示