There is this case.
I have many files(data) in the server. I use Ajax
and php
for Client browser
to get the data from the server.
When a person opens a website and accesses a file from the server, at the same time, if another person(user) open this website, I want to find a way to detect that file is open, if so, I can load a different file or just block this user.
How can I do this, any suggestion is appreciated, thanks for your time!
Ajax get the file
load: function (url) {
var _this = this;
$.ajax({
type: "GET",
url: url,
dataType: "text",
success: function (json) {
if (typeof json == 'string' || json instanceof String) {
json = JSON.parse(json);
_this.parse(json);
}
}
});
},
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…