get_resource_type

(PHP 4 >= 4.0.2, PHP 5)

get_resource_type --  Returns the resource type

Description

string get_resource_type ( resource handle)

This function returns a string representing the type of the resource passed to it. If the paramater is not a valid resource, it generates an error.

<?php
// prints: mysql link
$c = mysql_connect();
echo
get_resource_type($c) . "\n";

// prints: file
$fp = fopen("foo", "w");
echo
get_resource_type($fp) . "\n";

// prints: domxml document
$doc = new_xmldoc("1.0");
echo
get_resource_type($doc->doc) . "\n";
?>


Sites of interest: Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Web Design Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples
  Copyright © 2004 Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft