Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| snippets:php:fgets [26-Jan-2021 19:51] – Steve Joynt | snippets:php:fgets [02-Feb-2025 16:14] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| $filename = ' | $filename = ' | ||
| + | |||
| $fh = @fopen($filename, | $fh = @fopen($filename, | ||
| if ( ! $fh ) { | if ( ! $fh ) { | ||
| - | throw new exception(" | + | throw new Exception(" |
| } | } | ||
| Line 12: | Line 12: | ||
| echo $text; | echo $text; | ||
| } | } | ||
| - | |||
| - | fclose($fh); | ||
| - | |||
| </ | </ | ||