======file_exists====== WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0 Check if a file exists ====Description==== int file_exists ( string $filename ) Return 1 (true) if the file exists, otherwise return 0 (false) ====Parameter==== $filename: Full path and file name to check ====Return Values==== Integer: 1 if file exists, 0 if file does not exist ====Examples==== ===Simple existence report===
===Create a new file with a unique non-conflicting filename=== This example is extracted from the Wattmon OS "/scripts/logrotate.cgi": ====See Also==== [[findfirst()]] - Start searching the current folder for files matching a pattern and attributes [[strftime()]] - Format a Linux Timestamp using a format string [[time()]] - Return the current system timestamp [[rename()]] - Rename or move a file or directory from source to destination [[log()]] - Print to the System Log (or optional file) [[uphp:uphp_special_variables]] - Special arrays that are populated automatically (including ''$_GLOBALS'')