mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Add TWO examples.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@168162 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
43057e415d
commit
24b526c3d4
1 changed files with 44 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.stream-get-wrappers">
|
||||
<refnamediv>
|
||||
<refname>stream_get_wrappers</refname>
|
||||
|
@ -15,6 +15,49 @@
|
|||
Returns an indexed array containing the name of all stream wrappers
|
||||
available on the running system.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>stream_get_wrappers</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
print_r(stream_get_wrappers());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[0] => php
|
||||
[1] => file
|
||||
[2] => http
|
||||
[3] => ftp
|
||||
[4] => compress.bzip2
|
||||
[5] => compress.zlib
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Checking for the existence of a stream wrapper</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?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.';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>stream_wrapper_register</function>.
|
||||
|
|
Loading…
Reference in a new issue