1

I have to run an installer written in php code 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 he 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 should ever happen.

0

1 Answer 1

4

all you need do is add

unlink(__FILE__); 

to the end

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.