October 21, 20169 yr I must be missing something obvious. Can someone tell me why this php code won't work! if (file_exists("config.php")) { if (file_exists("cp.reg")) { header('Location: pads/default/'); } else { header('Location: pads/noreg/'); } } else { header('Location: pads/startup/'); } But if I take out the nested if it works fine. But I can't see any reference to the fact that you cannot nest file_exists statements? I realise I could rewrite to set a flag for one of the file exists but it seems less efficient. TIA Paul
Create an account or sign in to comment