Search code examples
phpapachefile-recovery

Anyway to recover a php file that is currently open on my browser but deleted from my localhost?


I accidentally deleted a file that I have been working on for the last 2 days using the unlink() function. I was using the unlink function to delete other files but the name of the other files was similar to the file I was working on so it got deleted.

Also the same page that just got delete is still open in my browser and functioning normally. I am thinking it must be open or saved in a temp file somewhere by my Apache, could this be true? or am I dreaming?

I have tried recovery tools but I have given up on them as I am a new Ubuntu user and don't want to spend too much time fiddling around with things I don't know anything about.


Solution

  • Also the same page that just got delete is still open in my browser and functioning normally. I am thinking it must be open or saved in a temp file somewhere by my Apache, could this be true?

    No.

    Apache executes the PHP program, sends the output of it to the client, then stops. It doesn't keep the program running after the page has been delivered.