サーバーの速度をチェックする小さなコードを書きました。しかし、実行が完了するまでに約 60 秒かかります。
<?php
$start=time();
$to = "test@gmail.com";
$subject = "This is subject";
$message = "<b>This is HTML message.</b>";
$message .= "<h1>This is headline.</h1>";
$header = "From:test@mydomain.com \r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html\r\n";
$retval = mail ($to,$subject,$message,$header);
if( $retval == true ) {
echo "Message sent successfully...";
}else {
echo "Message could not be sent...";
}
$after=time();
$total=$after-$start;
echo "</br>";
echo "Total execution time : ".$total." seconds";
?>
理由は何でしょうか?どうすれば実行時間を改善できますか?私はすでにphp.iniファイルのメモリ制限を増やしました。