If conditions like this can be written again, should not use switch, after all, to determine the time, frequency, IP and other conditions.
If (access time period) {
echo "Normal time period";
if (ID range) {
echo "Normal ID range";
if (number of visits) {
echo "Normal access times";
if (IP address) {
echo "Normal IP Address";
}else{
echo "Error IP Address";
}
}else{
echo "Excessive number of visits";
}
}else{
echo "Error ID range";
}
}
else{
echo "Please take a rest";
}
Reply to discussion (solution)
The parallel notation
while (true) { if (access time period) { echo "normal time period"; } else { echo "Please pay attention to rest"; break; } if (ID range) { echo "normal ID range"; } else { echo "error ID range"; break; } if (number of visits) { echo "normal access times"; } else { echo "too many visits"; break; } if (IP address) { echo "normal IP Address"; } else{ echo "Error IP address"; break; } break;}
$error = 0;if (Access time period) { echo "normal time period"; else{ $error = 1; echo "Please take a Rest";} if ($error ==0 && ID range) { echo "normal ID range";} else{ $error = 1; echo "Error ID range";} if ($error ==0 && visits) { echo "normal Access";} else{ $error = 1; echo "Too many visits";} if ($error ==0 && IP address) { echo "normal IP address";} else{ $error = 1; echo "Error IP address";}
Second floor of the parallel structure is very good understanding, the third floor of the use of OH ...