update page now

Voting

: eight minus seven?
(Example: nine)

The Note You're Voting On

tom dot vom dot berg at online dot de
11 years ago
if you want to daysychain a filehandle through some functions and each function is allowed to close th file you might look in a following function first, if the handle is still valid.
Opening a file, there often will be used a code like
if (!$fh = fopen($filename, $mode)) return false;
But if you possably have closed the file and you want to check that, a smililar statement would not work.
DOES NOT WORK: if (!$fh) end_of_chain();
use beter: if (is_resource($fh)) end_of_chain();

<< Back to user notes page

AltStyle によって変換されたページ (->オリジナル) /