Resource datatype in PHP

How to define an Resource variable and assign value?


A resource is a special variable, holding a reference to an external resource. Resources are created and used by special functions
The following is a list of few functions which create, use or destroy PHP resources.
fbsql_db_query()-Selects a database and executes a query on it.
ftp_connect()-opens an FTP connection to the specified host .
imap_open()-Open an IMAP stream to a mailbox
dba_popen()-establishes a persistent database instance for path with mode using handler .
imagerotate()-Rotate an image with a given angle
The function is_resource() can be used to determine if a variable is a resource and function get_resource_type() will return the type of resource it is.

PHP Topics

Ask Questions

Ask Question