Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: stream_get_filters - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: stream_get_filters

2025-05-16

stream_get_filters

(PHP 5, PHP 7, PHP 8)

stream_get_filters获取已注册的数据流过滤器列表

说明

stream_get_filters(): array

获取当前运行系统中已注册的数据流过滤器列表。

参数

此函数没有参数。

返回值

返回一个包含所有有效的数据流过滤器名字的索引数组。

示例

示例 #1 使用 stream_get_filters()

<?php
$streamlist
= stream_get_filters();
print_r($streamlist);
?>

以上示例的输出类似于:

Array (
  [0] => string.rot13
  [1] => string.toupper
  [2] => string.tolower
  [3] => string.base64
  [4] => string.quoted-printable
)

参见

添加备注

用户贡献的备注 1 note

up
3
Jasper Bekkers
19 years ago
Filters to be used within the convert filter are base64-encode, base64-decode, quoted-printable-encode and quoted-printable-decode. Note: those are not in the string filter, as currently reported by the manual!

Example usage is:
<?php
$h
= fopen('gecodeerd.txt', 'r');
stream_filter_append($h, 'convert.base64-decode');
fpassthru($h);
fclose($h);
?>
Or
<?php
$filter
= 'convert.base64-decode';
$file = 'coded.txt';
$h = fopen('php://filter/read=' . $filter . '/resource=' . $file,'r');
fpassthru($h);
fclose($h);
?>

官方地址:https://www.php.net/manual/en/function.stream-get-filters.php

冷却塔厂家 广告
中文GPT4.0无需注册 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3