dave Tue Sep 7 20:00:56 2004 EDT
Modified files: /phpdoc/en/reference/stream/functions stream-get-wrappers.xml Log: - Add TWO examples. http://cvs.php.net/diff.php/phpdoc/en/reference/stream/functions/stream-get-wrappers.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/stream/functions/stream-get-wrappers.xml diff -u phpdoc/en/reference/stream/functions/stream-get-wrappers.xml:1.4 phpdoc/en/reference/stream/functions/stream-get-wrappers.xml:1.5 --- phpdoc/en/reference/stream/functions/stream-get-wrappers.xml:1.4 Wed Jun 16 09:01:22 2004 +++ phpdoc/en/reference/stream/functions/stream-get-wrappers.xml Tue Sep 7 20:00:54 2004 @@ -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> @@ -14,6 +14,49 @@ <para> 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