0
我有循環問題。如何在循環中創建循環(雙循環)
我有這樣的代碼,
foreach ($j as $empas) {
date_default_timezone_set('Asia/Jakarta');
$nomor = Nomor($i, $total);
$proses = proses($total, $i) . "%";
$timeServer = date("G:i:s");
$toDay = date("d-M-Y");
for($p=0;$p<$total;$p++){
$user = $userlist[$p%count($userlist)] ;
echo "\e[37m [" . $timeServer . "] - {$nomor}/{$total} - [{$proses}] {$user} > {$empas} \e[0m ";;
if (isEmail($empas)) {
echo imakochan($empas, $letter, $host, $user, $pw, $port, $sendermail, $sendername, $subjek). "\n";
} else {
echo " This is not valid email ";
}
if ($i == $total) {
echo "\n";
echo " [0;34m ================================================================================== \n";
echo " [0;34m [+] Sending Proccess Completed on " . $timeServer . " [+]\n";
}
$i++;
}
}
所以,我的問題是我不能轉動SMTP當PHP郵件發送電子郵件。 >發送 -
我想SMTP電子郵件旋轉,應該通過電子郵件
這樣
smtpuser1> EMAIL1旋轉!
smtpuser2> email2 - >發送!
smtpuser1> email3 - >發送!
smtpuser2> email4 - >發送!
當我做這樣的,我有問題:
[17:01:42] - 1/2 - [50%] smtpuser1 > [email protected] -> Sent!
[17:01:42] - 1/2 - [50%] smtpuser2 > [email protected] -> Sent!
==================================================================================
[+] Sending Proccess Completed on 17:01:42 [+]
[17:01:50] - 3/2 - [150%] smtpuser1 > [email protected] -> Sent!
[17:01:50] - 3/2 - [150%] smtpuser2 > [email protected] -> Sent!
$ user有什麼功能? – UmRchan
我忘了刪除$ user變量。我用$ smtp變量替換它,對它們的使用更具描述性。 –
在我的代碼中,我使用$ i = 1,但是你用它爲0.我怎麼改變它?因爲我使用它打印完整的橫幅。 – UmRchan