![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
When does the php stop?
My program currently has a "Save" button, which saves the latest version of the
data. However I soon realised that it was all too easy to overlook this step before moving on to something else, and started thinking about the best backup strategy. I don't like the Word strategy of trying to catch shutdown commands and putting up a "Want to save this" screen, and now think the best strategy would be to make a dated backup file when the program was opened (and perhaps every hour or so thereafter), and then to save every change back to disk as soon as it was made. At the moment I think I could afford to save the changes before I load the next page, but if my database gets much bigger this might take a significant time, so that it would be better to do it after the page was loaded. This brings up the dual questions of when the HTML page becomes active, and when the php stops running. Every page I have ever seen which uses php ends with the lines: ?> </body> </html> Is it possible to run a save procedure after the </html> or would any php after this command not be executed? And if I put a save procedure taking a few seconds before the </body> line, would the page respond to the user immediately, or not until the save procedure had finished? It sounds as if the exec command might offer a better solution, but the manual does not make it clear whether this can execute a user-defined command, or only a system command. Clancy |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|