Prevent Code or Function from Executing More Than Once
问题 Is there a way to prevent a code-block or a function within a code from running more than once even if I re-execute (or reload) the PHP file? I mean, can I restrict someone from executing a php script more than once? I can't seem to find the way to do this. 回答1: I have an app that does that. What we did was create a table in the db called version, and stored a version number in there. When the script is ran, it compared the version number in the database with that in the php script. And