Pro*_*ast 0 php conditional if-statement
每次运行此代码时,只会"Not from a"写入,无论位置是否为"a".
function logsIn($dir, $account, $balance) {
$d = date("D F d Y - h:i A");
$file = fopen("logs/$dir.txt", "a");
if ($_SESSION['pass'] == "123") {
if ($api["Location"] != "a")
fwrite($file, "<span style='color:#FF0000;text-align:center';>Not from a.</span>");
else
fwrite($file, "From a.");
}
Run Code Online (Sandbox Code Playgroud)