This is an old revision of the document!
WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Close a file, stream or socket
handle: Valid handle of a previously opened resource
None
<? $f=fopen("/test.txt","r"); //open the file for reading and get the file handle if ($f) { print(fgets($f)); //print the first line of the file fclose($f); //close the file referenced by file handle } else { print("Unable to open file /test.txt"); } ?>
fopen() - Open a file for reading or writing
f485open() - Open the RS-485 port as a stream
fseropen() - Open the serial port at the specified baud rate with optional parameters
fsockopen() - Open an internet socket connection
fread() - Return bytes from a file or stream
fgets() - Return a single line from a file or stream, with optional size limit
fwrite() - Write data to a file or stream
if - Flow control structure for conditional execution