PHP Poll,如何将ip添加到txt文件中 [英] PHP Poll, How to add ip to txt file for

查看:67
本文介绍了PHP Poll,如何将ip添加到txt文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试将用户IP写入txt文件,以最大限度地减少对简单的PHP民意调查的双重投票我一直在尝试编码自己,因为我想学习。任何人都可以指出我实现这一目标的方向吗?我需要能够写入ip到txt然后调用txt来检查是否已经投票了,谢谢你们的任何时间,非常感谢,Creig

Hello,, I am trying to write user ip to a txt file to minimize double voting on a simple php poll i have been trying to code myself as i want to learn. Can anyone maybe point me in the direction of achieving this? I need to be able to write the ip to txt then call the txt to check if already voted, Thank you for any of your time, Greatly appreciated, Creig

推荐答案

最好使用数据库。这里是您需要的代码。
Better to use database. Here your needed code.


ip =


_SERVER [REMOTE_ADDR];
_SERVER[REMOTE_ADDR];


这篇关于PHP Poll,如何将ip添加到txt文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆