stream_get_wrappers

(PHP 5, PHP 7)

stream_get_wrappers锟斤拷取锟斤拷注锟斤拷锟斤拷锟斤拷锟斤拷锟�

说锟斤拷

stream_get_wrappers ( void ) : array

锟斤拷取锟节碉拷前锟斤拷锟斤拷系统锟斤拷锟窖撅拷注锟结并锟斤拷使锟矫碉拷锟斤拷锟斤拷锟斤拷锟叫憋拷

锟斤拷锟斤拷值

锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟介,锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷说锟角帮拷锟斤拷锟较低筹拷锌锟绞癸拷玫锟斤拷锟斤拷锟斤拷偷锟斤拷锟斤拷啤锟�

锟斤拷锟斤拷

Example #1 stream_get_wrappers() 锟斤拷锟斤拷

<?php
print_r
(stream_get_wrappers());
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

Array
(
    [0] => php
    [1] => file
    [2] => http
    [3] => ftp
    [4] => compress.bzip2
    [5] => compress.zlib
)

Example #2 锟斤拷锟揭伙拷锟斤拷锟斤拷锟斤拷锟斤拷欠锟斤拷锟斤拷

<?php
// check for the existence of the bzip2 stream wrapper
if (in_array('compress.bzip2'stream_get_wrappers())) {
    echo 
'compress.bzip2:// support enabled.';
} else {
    echo 
'compress.bzip2:// support not enabled.';
}
?>

锟轿硷拷