Quick question:
Is it possible to make a PHP script that deletes itself after execution ?
Do I have to chmod it writeable first ?
Printable View
Quick question:
Is it possible to make a PHP script that deletes itself after execution ?
Do I have to chmod it writeable first ?
Can't you just use unlink("script.php"); in your script?
Sean :)
What Shin Ma meant was...so be able to delete itself after executing the entire script.Much like an uninstall script..Quote:
Originally posted by seanf
Can't you just use unlink("script.php"); in your script?
Sean :)
after running through the uninstall procedures..it removes itself too for a clean uninstall..
He would use unlink in his script to delete itself after it has executed successfully
Sean :)
I'll try unlink then. Thanks a lot :)
Edit: oops, won't delete itself even after I chmoded it 777. :( I'll make a redirection to another script to delete it, then.