September 2001
Intermediate to advanced
768 pages
32h 45m
English
string gettype(resource resource) Finds the type of a resource.
Returns:
String containing the resource type name; FALSE on error
Description:
get_resource_type() returns the specific type of a resource. Resources are abstract datatypes representing a handle to a particular system resource, such as file/stream pointers, database connections, and so forth.
If the resource type is not known, Unknown is returned. If the value passed is not a resource, the function will generate a warning and return FALSE.
Version:
PHP 4.0.2+
Example:
<?php echo get_resource_type (mysql_connect ()), "\n", get_resource_type (mysql_query ("SELECT now()")), "\n", get_resource_type (fopen (__FILE__, 'r')), ... |
Read now
Unlock full access