How do I add a self-destruct program to PHP?

add a self-destruct program, set it to be activated after a certain time of visit, and then self-destruct for a number of periods of time. The file database is empty. How do you do that?

May.31,2022

is there a server? Write a scheduled task, regularly visit a method in the program
, and then truncate... in it. Cool


does this mean to delete the library and run away? Be reasonable


php-fpm worker process. Generally, users will set it to www if you use a database with limited user permissions, if you use rds, you can't delete it. If you have a large amount of business, you can also lose data.


your mind is dangerous, young man.

PHP has unlink functions to delete files, and SQL has DELETE commands to delete data.


php script + cli+crontab
php script + queue+ message queue


scheduled task, timer of swoole or workerman, scandir unlink of php, delete from T1 where xxx of sql

-- is this to leave the back door and run away.

Menu