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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b247-2c283.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b247-2c283.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?