织梦dede自定义表单自动获取IP地址和提交时间

 时间:2024-10-21 07:43:03

1、第一步:在根目录中找到plus/diy.php文件,然后查找下面的代码  if($fiel蟠校盯昂dinfo[1] == 'textdata')  {  ${$fieldinfo[0]} = FilterSearch(stripslashes(${$fieldinfo[0]}));  ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]});  }后面添加  if($fieldinfo[0] == 'ip')  {  ${$fieldinfo[0]}=GetIP();  }  if($fieldinfo[0] == 'time')  {  ${$fieldinfo[0]}=date("Y-m-d H:i:s");  }添加完后代码如下图:

织梦dede自定义表单自动获取IP地址和提交时间织梦dede自定义表单自动获取IP地址和提交时间

3、第三步:修改前端html页面找到你网站提交信息页面的模板文件,然后查找下面的代码:<input type="hidden" name="dede_fields"如图:

织梦dede自定义表单自动获取IP地址和提交时间

5、第五步:给第三步中找到的代码添加信息:ip,text;time,text例如:<input type="hidde荏鱿胫协n" name="dede_fields" value="city,select;area,text;shi,select;ting,select;chu,select;wei,select;yangtai,select;xm,text;tel,text;dizhi,text;fengge,text" />添加后(加粗的代码就是需要添加的代码):<input type="hidden" name="dede_fields" value="city,select;area,text;shi,select;ting,select;chu,select;wei,select;yangtai,select;xm,text;tel,text;dizhi,text;fengge,text;ip,text;time,text" />

织梦dede自定义表单自动获取IP地址和提交时间

6、最后提醒大家,如果您在修改以后发现提示:“数据校验不对,程序返回”,请点击下面链接

  • 备案网站迁移这样弄会被判定为空壳网站
  • 棋牌游戏平台开发:棋牌运营如何做好推广?
  • 锅炉热电机组DEH操作说明?
  • ZEQ丰臀打造诱惑美臀翘臀法
  • 篮球比赛还可以在直播(8)吧 里看的
  • 热门搜索
    手机投屏电视怎么设置 四叶草怎么折 翡翠手镯怎么挑 肯德基储备经理怎么样 工资表怎么做 怎么能怀孕 小孩感冒发烧怎么办 三星怎么截屏 感冒喉咙痛怎么办 车厘子怎么保存才新鲜