This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:filesize [2017/04/05 14:07] jeff |
uphp:functions:filesize [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 11: | Line 11: | ||
**Filename Form** - The syntax is the same as in mainline PHP, and uses a filename for the parameter: | **Filename Form** - The syntax is the same as in mainline PHP, and uses a filename for the parameter: | ||
- | <well size=" | + | <well size=" |
- | <span style=" | + | <span style=" |
- | < | + | <span style=" |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
Line 19: | Line 19: | ||
</ | </ | ||
- | **Handle Form** - The syntax is unique to uPHP,((The Handle Form is more commonly used on the Wattmon. Compared to mainline PHP, this uPHP form is a much simpler method for retrieving the number of bytes pending in a stream. For examples of how much more complex mainline PHP can be, take a look at the PHP function [[http:// | + | **Handle Form** - The syntax is unique to uPHP,((The Handle Form is more commonly used on the [[hardware: |
- | <well size=" | + | <well size=" |
- | <span style=" | + | <span style=" |
- | < | + | <span style=" |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
Line 37: | Line 37: | ||
< | < | ||
- | ====Return | + | ====Return |
- | Bytes in the file or pending in the stream or socket | + | < |
====Examples==== | ====Examples==== | ||
- | **Filename Form, output the size of the System Log:** | + | ===Filename Form, output the size of the System Log=== |
<code php> | <code php> | ||
Line 52: | Line 52: | ||
</ | </ | ||
- | **Handle Form, for a file, output the file size:** | + | ===Handle Form, for a file, output the file size=== |
<code php> | <code php> | ||
Line 63: | Line 63: | ||
?></ | ?></ | ||
- | **Handle Form, for a socket** - this example is extracted from the Wattmon OS "/ | + | ===Handle Form, for a socket=== |
+ | |||
+ | This example is extracted from the Wattmon OS "/ | ||
<code php> | <code php> | ||
Line 107: | Line 109: | ||
[[file_exists()]] - Check if a file exists | [[file_exists()]] - Check if a file exists | ||
- | [[ini_get()]] - Return the value associated with the key if it exists, or the default value otherwise | + | [[ini_get()]] - Get a value from an INI file |