September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool is_resource(mixed value) Tests whether a value is a resource pointer.
Returns:
TRUE if the value is a resource pointer; FALSE otherwise
Description:
is_resource() checks whether value is a resource pointer that has been returned by a call to fopen(), popen(), opendir(), etc., or one of the database functions such as mysql_connect(), msql_pconnect(), etc. If so, the function returns TRUE. If not, FALSE is returned.
Availability:
UNIX, Windows
Version:
3+, 4+
See also:
gettype()
Example:
$dir_handle = opendir ('..');
if (is_resource ($dir_handle))
print '$dir_handle is a resource pointer.';
else
print '$dir_handle is not a resource pointer.';
|
Read now
Unlock full access