小白教程
所有教程
关于
Search
172.71.254.70
172.71.254.70
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Php get resource type function”的源代码
本页内容
上一节:
Php_get_defined_vars_function
下一节:
Php_gettype_function
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:get_resource_type}}[[Category:php variable handling functions|7]] = PHP get_resource_type() 函数 = [[php variable handling functions|PHP 可用的函数]] '''get_resource_type()''' 返回资源(resource)类型。 版本要求:PHP 4 >= 4.0.2, PHP 5, PHP 7 === 语法 === <sample title="" desc="" lang="php" hererun="1"> string get_resource_type ( resource $handle ) </sample> 参数说明: * $handle:句柄。 === 返回值 === 此函数返回一个字符串,用于表示传递给它的 resource 的类型。如果参数不是合法的 resource,将产生错误。 == <sample title="" desc="" lang="php" hererun="1"> <?php $c = mysql_connect(); echo get_resource_type($c) . PHP_EOL; // 打印:mysql link $fp = fopen("foo","w"); echo get_resource_type($fp) . PHP_EOL; // 打印:file $doc = new_xmldoc("1.0"); echo get_resource_type($doc->doc) . PHP_EOL; // 打印:domxml document ?> </sample> [[php variable handling functions|PHP 可用的函数]]
返回至“
Php get resource type function
”。
上一节:
Php_get_defined_vars_function
下一节:
Php_gettype_function