PHP file that should run once with no errors and delete itself. Is it possible? How to create such file?
A:
On linux try:
<?php
system( 'rm filename.php' );
And then write back if there was a success.
smentek
2010-04-05 15:00:19
Might be a better idea to use PHP's `unlink`, and use a value in the `$_SERVER` array in place of the hardcoded 'filename.php', to make it more portable?
LeguRi
2010-04-05 15:02:45
Does `unlink` not work in a windows environment?
LeguRi
2010-04-05 15:07:59
true unlink is better.
smentek
2010-04-05 15:08:49
@smentek Hm.. I use XAMPP apache on windows... So I wonder for some crossplatform way...
Blender
2010-04-05 15:16:33