ho iniziato questo processo (time.php)Come faccio a interrompere uno script PHP in esecuzione sullo sfondo
<?php
ignore_user_abort(true); // run script in background
set_time_limit(0); // run script forever
$interval = 300; // do every 1 minute...
do
{
// add the script that has to be ran every 1 minute here
// ...
$to = "[email protected]";
$subject = "Hello Richie";
$header = "From: [email protected]";
$body = "Hello Richard,\n\n"
. "I was just testing this service\n\n "
. "Thanks! ";
mail($to, $subject, $body, $header);
sleep($interval); // wait 5 minutes
} while(true);
?>
ma ora voglio fermarlo. Invia centinaia di mail al mio account Gmail a/c. È su un server web dove non posso riavviarlo per uccidere il processo.
Esiste un modo per eseguire un altro file per terminare il processo o come procedere?
dal comando riga 'kill'. E la prossima volta non iniziare quello che non sai come fermare –
Il tuo host ti dà accesso alla console (SSH)? –
'ignore_user_abort (true);' + 'while (true);' + 'mail' =' Very Bad' – Baba