php,js

WBOY
Release: 2016-06-23 14:04:03
Original
1028 people have browsed it

怎么用文件记录下按钮的状态,比如一个button按下了就设置为disable,要将这个状态记录到文件中,刷新后读取文件的内容。  具体不知道怎么实现对文件的操作,新手求教。。。


回复讨论(解决方案)

//获取文件的值$disable = @file_get_contents('disable.txt');//设置文件@file_put_contents('disable.txt','true');
Copy after login
Copy after login


>

大概这样子

//获取文件的值$disable = @file_get_contents('disable.txt');//设置文件@file_put_contents('disable.txt','true');
Copy after login
Copy after login


>

大概这样子
初始时要可以点的,点了一下才变成 disable ,然后才存入文件

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template