This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:fclose [2017/02/22 09:49] jeff |
uphp:functions:fclose [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
======fclose====== | ======fclose====== | ||
+ | |||
< | < | ||
Line 5: | Line 6: | ||
====Description==== | ====Description==== | ||
- | <well size=" | + | |
- | < | + | <well size=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
+ | <span style=" | ||
</ | </ | ||
Close a resource that has previously been opened | Close a resource that has previously been opened | ||
- | ====Parameters==== | + | ====Parameter==== |
- | < | + | |
+ | <html><b>< | ||
+ | |||
+ | ====Return Values==== | ||
- | ====Return Value==== | ||
None | None | ||
====Example==== | ====Example==== | ||
- | <code php><? | + | |
- | $f=fopen("/ | + | <code php> |
- | if ($f) { | + | <? |
- | print(fgets($f)); | + | $f=fopen("/ |
- | fclose($f); //close the file referenced by file handle | + | if ($f) { |
- | } else { | + | print(fgets($f)); |
- | print(" | + | fclose($f); // close the file referenced by file handle |
- | } | + | } else { |
- | ?></ | + | print(" |
+ | } | ||
+ | ?> | ||
+ | </ | ||
====See Also==== | ====See Also==== | ||
+ | |||
[[fopen()]] - Open a file for reading or writing | [[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 |
+ | |||
+ | [[f485open()]] - Open the RS-485 port at the specified baud rate and parity | ||
+ | |||
+ | [[fsockopen()]] - Open an internet socket connection with optional timeout | ||
+ | |||
+ | [[fread()]] - Read bytes from a file, stream | ||
- | [[fseropen()]] - Open the serial port as a stream | + | [[fgets()]] - Return |
- | [[fsockopen()]] - Open an internet | + | [[fwrite()]] - Write data to a file, stream or socket |
- | [[fread()]] - Return bytes from a file or stream | + | [[feof()]] - Test if no more data is available in a file, stream |
- | [[fgets()]] - Return | + | [[filesize()]] - Return |
- | [[fwrite()]] - Write data to a file or stream | + | [[fseek()]] - Position the file pointer in an open file |
- | [[uphp: | + | [[ftell()]] - Return the current position of a file read/write pointer |