パワーオフがトリガされたときに関数を実行するにはどうすればよいですか?パワーオフ前に関数を実行する
// need to make sure here that poweroff command is executed successfully before calling senEmail function
$output = exec('poweroff', $output, $return);
if (!$return) {
// command executed successfully
// now send email before poweroff completes its process
sendEmail();
}
sendEmail()
シャットダウンが既に処理されているため、トリガーされません。
できません。 poweroffコマンドを実行する前にメールを送信できます。 –
@ Karthikeyan.R.S、Aw!それはとても悲しい男です。他の方法はありますか? – Defyleiti