谁能解释为什么以下不起作用?
我想写if is Blocked user
in the arraylog.txt
$user
$blockedusers
$blockedusers = array("USER1", "USER2");
$user = "USER1";
foreach ($user as $blockedusers) {
$file = 'log.txt';
$current = file_get_contents($file);
$current .= 'Blocked user' . "\n";
file_put_contents($file, $current);
}
有任何想法吗?