How to check if txt file exists inside template folder?
You are trying to check it by URL, which makes no sense to is_file() which expects local path. By the way I’d use file_exists() instead. Try: $fileName1 = TEMPLATEPATH . ‘/txtfolder/file1.txt’;