Backend- will I have trouble renaming real-time accessed folder via php?

Asked

Viewed 18 times

0

Users access pages within a folder. My site will have a function for moderators to rename the folder name if they want. What would happen if the folder was being accessed and some moderator changed its name?

Note 1: The link to access the file inside the folder is based on the database, that is, there will be no "page not found" problem when changing the folder name, as the new name will go to the BD.

1) Could not rename as the folder is having access 2) Those who have already loaded, nothing will happen. Those who will load, nothing will happen also because you will access already with the new name. Ideal situation. There will be no problem with users. 3) The same as number two, however a problem will happen: those who have clicking at the exact moment will fall on page not found.

What do you recommend based on the answer? If you have any problem renaming, I think about creating a table with the new folder name q the moderator wants to rename along with the old name, and pass it on while when the site is on monthly maintenance. Would be gambiarra?

I’m developing the site for study, these are hypothetical situations. I don’t think it’s possible to rename with user access, but I don’t know. I did not take the test in practice because the site is still being developed when this curiosity arose.

  • An important question, why rename the folder and modify the structure?

  • It is because folders are modules, each module has several tasks. It is a study site. The "moderators" create modules and tasks, as well as edit them. Each module has several levels and each level has several tasks for the user to complete. Maybe I should do it another way, but the way it came to mind is: Folders with modules. Inside them, folders with levels. Inside the folders with levels (Exp: lvl folder 0) will be the tasks, like this: task0.php, task1.php etc So I have more control Do you think it’s a bad idea? Maybe I can modify it since it’s at the beginning

  • I also thought about leaving all the tasks mixed together in one folder, and define in the relational database which module and level is that task. But sla, I like to leave each one in each little stick.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.