html部分

您的姓名:

您的微信:

您的公司:

您的电话:

您的职位:

php部分

<?php
session_start();
$allow_sep = "3000000";
if (isset($_SESSION["post_sep"]))
{
if (time() - $_SESSION["post_sep"] < $allow_sep)
{

    exit("请不要刷新!刷新后礼品逃跑了。。。"); 

}
else
{

 $_SESSION["post_sep"] = time(); 

}
}
else
{
$_SESSION["post_sep"] = time();
}
?>

<?php
$name = $_POST['name'];
$wechat = $_POST['wechat'];
$company = $_POST['company'];
$tel = $_POST['tel'];
$zhiwei = $_POST['zhiwei'];
$content = "姓名: ".$name ."微信: ".$wechat."公司: ".$company."联系电话: ".$tel."职位: ".$zhiwei."\n";
$f = fopen("/xxx/list.txt", 'a+');//指定文件路径Windows下用/,在文件的结尾插入,所以用了fopen和a+,
fwrite($f, $content);
fclose($f);
?>
嗨~你好! <?php echo htmlspecialchars($_POST['name']); ?>


微信<?php echo htmlspecialchars($_POST['wechat']); ?>


联系电话<?php echo (int)$_POST['tel']; ?>


公司<?php echo htmlspecialchars($_POST['company']); ?>


职位<?php echo htmlspecialchars($_POST['zhiwei']); ?>


请将该页面展示给工作人员后领取小礼品请勿刷新改页面

用 supervisor
先安装 supervisor
sudo apt install supervisor
创建 supervisor frps 配置文件
在 /etc/supervisor/conf.d
创建撇脂文件 frp.conf

[program:frp]
command = /root/frp/frps -c /root/frp/frps.ini
autostart = true

重启supervisor服务
systemctl restart supervisor
查看supervisor运行状态
supervisorctl status

JSON example using Sonoff Basic Smart Switch & ESPEasy.

ThomasB, Apr-10-2019

Connect to ESPEasy on local IP (change as needed to match the device) and load the jason into a array called "espez"

import json, requests
url = requests.get('http://192.168.1.81/json')
espez = json.loads(url.text)

Show an example of printing the current value of the built-in push button switch.

Device configuration as follows: Task= 1, Device= Switch input-Switch, Name= PBSW

print("Device Name: ", espez'Sensors'['TaskName'])

wendu = int(espez'Sensors''TaskValues'['Value'])

print("Temp is : ", wendu)

if wendu >=27: #判断并且显示温度高低

print('Hot Temp is:',wendu,'°C')

else:

print('Cool Temp is:',wendu,'°C')


参考链接:
https://www.letscontrolit.com/forum/viewtopic.php?f=6&t=6612&p=36311