ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Is there a way to ZCode for self destruct in PHP?


have to run a web-installer written in php that has to be deleted after it is run. It is a run-once setup process that for security reasons needs to be removed so it cannot be run again. The final lines of code display that the routine successfully completed then exits. Is there a way to script in for the file to "self destruct" after displaying that message?

It has never failed a successful run so I am not very worried about having to add another copy of it if that happens.

Stoic Joker:

from the calling file after the installer file returns...or try running it on installer file exit (I haven't tested this, but it's worth a shot).

Thanks.  I had someone else tell me similar  Have to check the exact layout but whatever i tried , it did not work
The script fi al chatacter is a "?"  for input .  As in OK or ..
it is always OK
anyway I added the "unlink" after it and i think i need to get rid of the ? input mark.
Will try again tomorrow
Just a little bitty niggle that I would have liked to add.  I forget to delete the installer sometimes

Thanks Stoic..


[0] Message Index

Go to full version