is_resource() returns TRUE if the variable given by the var parameter is a resource, otherwise it returns FALSE.
<?php
$db_link = @mysql_connect('localhost', 'mysql_user', 'mysql_pass');
if (!is_resource($db_link)) {
die('Can\'t connect : ' . mysql_error());
}
?>See the documentation on the resource-type for more information.
| This HTML Help has been published using the chm2web software. |