php7 get,get_resources()

get_resources()

(PHP 7)

Returns active resources

说明get_resources([string$type]):array

Returns an array of all currently activeresources, optionally filtered by resource type.

参数$typeIf defined, this will causeget_resources()to only return resources of the given type.A list of resource types is available.

If thestringUnknownis provided as the type, then only resources that are of an unknown type will be returned.

If omitted, all resources will be returned.

返回值

Returns anarrayof currently active resources, indexed by resource number.

范例

Unfilteredget_resources()<?php

$fp = tmpfile();

var_dump(get_resources());

?>

以上例程的输出类似于:array(1) {

[1]=>

resource(1) of type (stream)

}

Filteredget_resources()<?php

$fp = tmpfile();

var_dump(get_resources('stream'));

var_dump(get_resources('curl'));

?>

以上例程的输出类似于:array(1) {

[1]=>

resource(1) of type (stream)

}

array(0) {

}

参见¿Se pueden usar con matrices de más de una dimensión?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值