mirror of
https://github.com/php/doc-ja.git
synced 2026-03-23 22:52:11 +01:00
sync with en.
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@306247 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
File diff suppressed because it is too large
Load Diff
60
language/wrappers.xml
Normal file
60
language/wrappers.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 8e2783c965dd78731eff265ccd3b1bfcc6404567 Maintainer: hirokawa Status: ready -->
|
||||
<!-- CREDITS: takagi -->
|
||||
<reference xml:id="wrappers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>サポートするプロトコル/ラッパー</title>
|
||||
<partintro>
|
||||
<para>
|
||||
PHP には多くの組み込みラッパーが用意されています。さまざまな URL 風のプロトコルによって、
|
||||
<function>fopen</function> や <function>copy</function>、
|
||||
<function>file_exists</function> そして <function>filesize</function>
|
||||
といったファイルシステム関数で使用することができます。
|
||||
これらのラッパーだけでなく、
|
||||
<function>stream_wrapper_register</function>
|
||||
関数でラッパーを自作することもできます。
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
ラッパーを指定する際の URL 構文としてサポートしているのは <literal>scheme://...</literal> 形式のみです。
|
||||
<literal>scheme:/</literal> や <literal>scheme:</literal>
|
||||
といった形式には対応していません。
|
||||
</simpara>
|
||||
</note>
|
||||
</partintro>
|
||||
|
||||
&language.wrappers.file;
|
||||
&language.wrappers.http;
|
||||
&language.wrappers.ftp;
|
||||
&language.wrappers.php;
|
||||
&language.wrappers.compression;
|
||||
&language.wrappers.data;
|
||||
&language.wrappers.glob;
|
||||
&language.wrappers.phar;
|
||||
&language.wrappers.ssh2;
|
||||
&language.wrappers.rar;
|
||||
&language.wrappers.audio;
|
||||
&language.wrappers.expect;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
200
language/wrappers/audio.xml
Normal file
200
language/wrappers/audio.xml
Normal file
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.audio" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>ogg://</refname>
|
||||
<refpurpose>オーディオストリーム</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
<filename>ogg://</filename> ラッパー経由で読み込みモードでオープンされた
|
||||
ファイルは、<literal>OGG/Vorbis</literal> コーデックでエンコードされた圧縮音声ファイルとして
|
||||
扱われます。同様に、<filename>ogg://</filename> ラッパー経由で書き込みモード
|
||||
あるいは追記モードでオープンされたファイルは、圧縮音声データとして
|
||||
書き込まれます。読み込みモードでオープンした <literal>OGG/Vorbis</literal> ファイルに対して
|
||||
<function>stream_get_meta_data</function> を適用した場合、以下のような
|
||||
さまざまな情報を返します。
|
||||
<parameter>vendor</parameter> タグ、<parameter>comments</parameter>、
|
||||
多くの <parameter>channels</parameter>、サンプリングレート
|
||||
<parameter>rate</parameter> 、
|
||||
および以下のパラメータで指定されるエンコーディングレート。
|
||||
<parameter>bitrate_lower</parameter>、<parameter>bitrate_upper</parameter>、
|
||||
<parameter>bitrate_nominal</parameter>、<parameter>bitrate_window</parameter>
|
||||
</para>
|
||||
|
||||
<simpara><filename>ogg://</filename> PHP 4.3.0 and up (PECL) </simpara>
|
||||
<note>
|
||||
<title>このラッパーはデフォルトでは有効になっていません</title>
|
||||
<simpara>
|
||||
<filename>ogg://</filename> ラッパーを使用するには、
|
||||
<link xlink:href="&url.pecl;">PECL</link> から
|
||||
<link xlink:href="&url.pecl.package;oggvorbis">OGG/Vorbis</link> 拡張モジュールを
|
||||
インストールする必要があります。
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>ogg://soundfile.ogg</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ogg:///path/to/soundfile.ogg</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ogg://http://www.example.com/path/to/soundstream.ogg</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<!-- FIXME: This should not be here! context.audio... -->
|
||||
<para>
|
||||
<table>
|
||||
<title>コンテキストオプション</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>名前</entry>
|
||||
<entry>使用法</entry>
|
||||
<entry>デフォルト</entry>
|
||||
<entry>モード</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>pcm_mode</literal></entry>
|
||||
<entry>
|
||||
読み込みの際に適用する PCM エンコーディング。以下のうちのひとつ。
|
||||
<constant>OGGVORBIS_PCM_U8</constant>、<constant>OGGVORBIS_PCM_S8</constant>、
|
||||
<constant>OGGVORBIS_PCM_U16_BE</constant>、<constant>OGGVORBIS_PCM_S16_BE</constant>、
|
||||
<constant>OGGVORBIS_PCM_U16_LE</constant>、および <constant>OGGVORBIS_PCM_S16_LE</constant>
|
||||
(8 ビットか 16 ビットか、符号付きか符号なしか、ビッグエンディアンかリトルエンディアンか)。
|
||||
</entry>
|
||||
<entry>OGGVORBIS_PCM_S16_LE</entry>
|
||||
<entry>Read</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>rate</literal></entry>
|
||||
<entry>
|
||||
入力データのサンプリングレート。Hz 単位。
|
||||
</entry>
|
||||
<entry>44100</entry>
|
||||
<entry>Write/Append</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>bitrate</literal></entry>
|
||||
<entry>
|
||||
整数値の場合、エンコードの際の固定ビットレート(16000 から 131072)。
|
||||
浮動小数点値の場合、使用する可変ビットレート(-1.0 から 1.0)。
|
||||
</entry>
|
||||
<entry>128000</entry>
|
||||
<entry>Write/Append</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>channels</literal></entry>
|
||||
<entry>
|
||||
エンコードする音声チャネル数。一般には 1(モノラル)あるいは 2(ステレオ)。
|
||||
最大 16 まで。
|
||||
</entry>
|
||||
<entry>2</entry>
|
||||
<entry>Write/Append</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>comments</literal></entry>
|
||||
<entry>
|
||||
エンコード時にトラックヘッダに入れる文字列の配列。
|
||||
</entry>
|
||||
<entry/>
|
||||
<entry>Write/Append</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
133
language/wrappers/compression.xml
Normal file
133
language/wrappers/compression.xml
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.compression" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>zlib, bzip2 および zip</refname>
|
||||
<refpurpose>圧縮ストリーム</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<simpara><filename>zlib:</filename> PHP 4.0.4 - PHP 4.2.3 (fopencookie をサポートするシステムのみ)</simpara>
|
||||
<simpara><filename>compress.zlib://</filename> および <filename>compress.bzip2://</filename> PHP 4.3.0以降</simpara>
|
||||
|
||||
<simpara>
|
||||
<filename>zlib:</filename> は <function>gzopen</function> と同様に
|
||||
動作しますが、このストリームは <function>fread</function> および
|
||||
他のファイルシステム関数と組み合わせて使用することができるところが
|
||||
異なります。この機能ではファイル名に ':' 文字が含まれる曖昧さが
|
||||
あるため、PHP 4.3.0 以降では古い機能となっています。代わりに
|
||||
<filename>compress.zlib://</filename> を使用してください。
|
||||
</simpara>
|
||||
|
||||
<simpara>
|
||||
<filename>compress.zlib://</filename> および
|
||||
<filename>compress.bzip2://</filename> は、それぞれ
|
||||
<function>gzopen</function> および <function>bzopen</function> と等価で、
|
||||
fopencookie をサポートしないシステムの上でも動作します。
|
||||
</simpara>
|
||||
<para>
|
||||
<link linkend="book.zip">ZIP 拡張モジュール</link> は <filename>zip:</filename> ラッパーを登録します。
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>zlib:</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>compress.zlib://</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>compress.bzip2://</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>
|
||||
No, 圧縮されたファイルの状態を知るには、通常の
|
||||
<literal>file://</literal> ラッパーを使用します。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>
|
||||
No, 圧縮されたファイルを unlink するには、通常の
|
||||
<literal>file://</literal> ラッパーを使用します。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
143
language/wrappers/data.xml
Normal file
143
language/wrappers/data.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.data" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>data://</refname>
|
||||
<refpurpose>データ (RFC 2397)</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
<filename>data:</filename> (<link xlink:href="&url.rfc;2397">RFC
|
||||
2397</link>) ストリームラッパーは、 PHP 5.2.0
|
||||
以降で使用可能です。
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>data://text/plain;base64,</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-include">allow_url_include</link> で制約される</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>data:// の内容の表示</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// "I love PHP" と表示します
|
||||
echo file_get_contents('data://text/plain;base64,SSBsb3ZlIFBIUAo=');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>media type の取得</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fp = fopen('data://text/plain;base64,', 'r');
|
||||
$meta = stream_get_meta_data($fp);
|
||||
|
||||
// "text/plain" と表示します
|
||||
echo $meta['mediatype'];
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
123
language/wrappers/expect.xml
Normal file
123
language/wrappers/expect.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.expect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>expect://</refname>
|
||||
<refpurpose>対話的プロセスストリーム</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
<filename>expect://</filename> ラッパでオープンしたストリームを使用すると、
|
||||
プロセスの標準入力・標準出力・標準エラー出力への PTY 経由でのアクセスが
|
||||
可能となります。
|
||||
</para>
|
||||
<note>
|
||||
<title>このラッパーはデフォルトでは有効となっていません。</title>
|
||||
<simpara>
|
||||
<filename>expect://</filename> ラッパーを使用するには、
|
||||
<link xlink:href="&url.pecl;">PECL</link> にある
|
||||
<link xlink:href="&url.pecl.package;expect">Expect</link> 拡張モジュールを
|
||||
インストールする必要があります。
|
||||
</simpara>
|
||||
</note>
|
||||
<simpara><filename>expect://</filename> PHP 4.3.0 以降 (PECL) </simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>expect://command</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
148
language/wrappers/file.xml
Normal file
148
language/wrappers/file.xml
Normal file
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>Filesystem</refname>
|
||||
<refpurpose>ローカルファイルシステムへのアクセス</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
PHP で使用されるデフォルトのラッパーは <emphasis>Filesystem</emphasis> で、
|
||||
これはローカルファイルシステムを表します。
|
||||
相対パス(/, \, \\,または Windows のドライブ文字で始まらないパス)が指定された場合、
|
||||
指定されたパスは、現在の作業ディレクトリに対して適用されます。
|
||||
多くの場合、これは、スクリプトがあるディレクトリです。ただし、カレントディレクトリが
|
||||
変更されている場合を除きます。
|
||||
CLI SAPI を使用した場合、このデフォルトはスクリプトがコールされたディレクトリとなります。
|
||||
</para>
|
||||
<simpara>
|
||||
<function>fopen</function> や <function>file_get_contents</function>
|
||||
のようないくつかの関数については、相対パスと同時に <literal>include_path</literal>
|
||||
も検索されます。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>/path/to/file.ext</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>relative/path/to/file.ext</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>fileInCwd.ext</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>C:/path/to/winfile.ext</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>C:\path\to\winfile.ext</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>\\smbserver\share\path\to\winfile.ext</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>file:///path/to/file.ext</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="changelog"><!-- {{{ -->
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.0.0</entry>
|
||||
<entry>
|
||||
<literal>file://</literal> が追加されました。
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
188
language/wrappers/ftp.xml
Normal file
188
language/wrappers/ftp.xml
Normal file
@@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.ftp" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>FTP と FTPS</refname>
|
||||
<refpurpose>FTP(s) URL へのアクセス</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
FTP 経由でのファイルの読み込みと新しいファイルの作成を許可します。
|
||||
サーバがパッシブモードの FTP をサポートしていない場合、接続は失敗します。
|
||||
</para>
|
||||
<simpara>
|
||||
読み込み用または書き込み用のどちらかでファイルをオープンすることが
|
||||
可能ですが、それらを両方同時に指定することはできません。FTP サーバ上の
|
||||
既存のファイルを書き込み用にオープンしようとした場合、もし
|
||||
コンテキストオプション <literal>overwrite</literal> が指定されていなければ
|
||||
接続は失敗します。既存のファイルを FTP 越しに上書きしたい場合は、
|
||||
コンテキストオプション <literal>overwrite</literal> を指定したうえで
|
||||
書き込み用にファイルをオープンします。別の方法としては、
|
||||
<link linkend="ref.ftp">FTP 拡張モジュール</link> を使用することも可能です。
|
||||
</simpara>
|
||||
<simpara>
|
||||
<link linkend="ini.from">from</link> ディレクティブを
|
||||
&php.ini; で設定した場合、この値が
|
||||
anonymous FTP のパスワードとして送信されます。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>ftp://example.com/pub/file.txt</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ftp://user:password@example.com/pub/file.txt</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ftps://example.com/pub/file.txt</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ftps://user:password@example.com/pub/file.txt</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>PHP 4</entry>
|
||||
<entry>PHP 5</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>Yes(新規ファイルのみ)</entry>
|
||||
<entry>Yes(新規ファイル あるいは 既存のファイルで <parameter>overwrite</parameter> を指定)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>
|
||||
PHP 5.0.0 では <function>filesize</function>、
|
||||
<function>filetype</function>、<function>file_exists</function>、
|
||||
<function>is_file</function> および <function>is_dir</function> のみ。
|
||||
PHP 5.1.0 で <function>filemtime</function>。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="changelog"><!-- {{{ -->
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.3.0</entry>
|
||||
<entry>
|
||||
<literal>ftps://</literal> が追加されました。
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="notes"><!-- {{{ -->
|
||||
&reftitle.notes;
|
||||
<note>
|
||||
<para>
|
||||
FTPS がサポートされるのは、<link linkend="book.openssl">openssl</link>
|
||||
拡張モジュールが有効な場合のみです。
|
||||
</para>
|
||||
<simpara>
|
||||
もしサーバが SSL をサポートして
|
||||
いなければ、通常の(暗号化されない)FTP を使用します。
|
||||
</simpara>
|
||||
</note>
|
||||
<note>
|
||||
<title>追記</title>
|
||||
<simpara>
|
||||
PHP 5.0.0 では、<literal>ftp://</literal> URL ラッパー経由での
|
||||
ファイルの追記が可能となりました。それ以前のバージョンでは
|
||||
<literal>ftp://</literal> 経由でのファイルの追記は失敗していました。
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
144
language/wrappers/glob.xml
Normal file
144
language/wrappers/glob.xml
Normal file
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.glob" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>Glob</refname>
|
||||
<refpurpose>パターンにマッチするパス名の検索</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<simpara>
|
||||
<filename>glob:</filename> ストリームラッパーは PHP 5.3.0 以降で使用可能です。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>glob://</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-include">allow_url_include</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>基本的な使用法</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// ext/spl/examples/ ディレクトリのすべての *.php ファイルについて、
|
||||
// そのファイル名とサイズを表示します
|
||||
$it = new DirectoryIterator("glob://ext/spl/examples/*.php");
|
||||
foreach($it as $f) {
|
||||
printf("%s: %.1FK\n", $f->getFilename(), $f->getSize()/1024);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
tree.php: 1.0K
|
||||
findregex.php: 0.6K
|
||||
findfile.php: 0.7K
|
||||
dba_dump.php: 0.9K
|
||||
nocvsdir.php: 1.1K
|
||||
phar_from_dir.php: 1.0K
|
||||
ini_groups.php: 0.9K
|
||||
directorytree.php: 0.9K
|
||||
dba_array.php: 1.1K
|
||||
class_tree.php: 1.8K
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
236
language/wrappers/http.xml
Normal file
236
language/wrappers/http.xml
Normal file
@@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.http" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>HTTP と HTTPS</refname>
|
||||
<refpurpose>HTTP(s) URL へのアクセス</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
HTTP 1.0 により HTTP GET メソッドを用いてファイル/リソースに読み込みのみの
|
||||
アクセスが可能です。仮想ホストにホスト名でアクセスするために、
|
||||
<literal>Host:</literal> ヘッダが送信されます。
|
||||
&php.ini; ファイルまたはストリームコンテキストによって
|
||||
<link linkend="ini.user-agent">user_agent</link> 文字列を設定している場合、
|
||||
それはリクエストの中にも含まれます。
|
||||
</para>
|
||||
<simpara>
|
||||
ストリームにより、リソースの <emphasis>body</emphasis> にアクセスすることが
|
||||
できます。ヘッダは、<varname>$http_response_header</varname> 変数に保存されます。
|
||||
PHP 4.3.0 以降は、ヘッダは <function>stream_get_meta_data</function>
|
||||
により取得できます。
|
||||
</simpara>
|
||||
&warn.ssl-non-standard;
|
||||
<simpara>
|
||||
PHP 4.0.5 以降、リダイレクトがサポートされています。これ以前のバージョンを
|
||||
使用している場合、URL の末尾にスラッシュを付ける必要があります。
|
||||
(全てのリダイレクトが処理された後に)ドキュメント取得元のリソースの URL を知ることが
|
||||
重要な場合、ストリームから返された一連のレスポンスヘッダを処理する必要があります。
|
||||
</simpara>
|
||||
<simpara>
|
||||
<link linkend="ini.from">from</link> ディレクティブを
|
||||
&php.ini; で設定して <xref linkend="context" /> では <literal>From:</literal>
|
||||
ヘッダを定義していない場合、この値が
|
||||
HTTP リクエストの <literal>From:</literal> ヘッダとして送信されます。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>http://example.com</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>http://example.com/file.php?var1=val1&var2=val2</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>http://user:password@example.com</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>https://example.com</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>https://example.com/file.php?var1=val1&var2=val2</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>https://user:password@example.com</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの可否</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追記可能</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き可</entry>
|
||||
<entry>N/A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> をサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> をサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> をサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> をサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> をサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="changelog"><!-- {{{ -->
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>4.3.0</entry>
|
||||
<entry>
|
||||
<literal>https://</literal> が追加されました。
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example xml:id="wrappers.http.example.basic"><!-- {{{ -->
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$url = 'http://www.example.com/redirecting_page.php';
|
||||
|
||||
$fp = fopen($url, 'r');
|
||||
|
||||
/* PHP 4.3.0 より前のバージョンの場合、stream_get_meta_data() の代わりに
|
||||
$http_response_header を使用してください */
|
||||
$meta_data = stream_get_meta_data($fp);
|
||||
foreach($meta_data['wrapper_data'] as $response) {
|
||||
|
||||
/* リダイレクトされているか? */
|
||||
if (substr(strtolower($response), 0, 10) == 'location: ') {
|
||||
/* $url をリダイレクト先に書き換える */
|
||||
$url = substr($response, 18);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example><!-- }}} -->
|
||||
|
||||
<example xml:id="wrappers.http.example.custom.headers"> <!-- {{{ -->
|
||||
<title>HTTP リクエストで独自のヘッダを送信する</title>
|
||||
<para>
|
||||
バージョン 5 より前では、HTTP リクエストで独自のヘッダを送信することができます。
|
||||
これは INI 設定項目 <literal>user_agent</literal>
|
||||
を処理する際の副作用によるものです。
|
||||
<literal>user_agent</literal> に何らかの正常な文字列
|
||||
(たとえばデフォルト設定の <literal>PHP/version</literal> など)
|
||||
を指定し、さらに続けて
|
||||
キャリッジリターン(\r) / ラインフィード(\n)
|
||||
を置いた後に任意のヘッダを記述します。
|
||||
この方法は、PHP 4 以降のバージョンで動作します。
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
ini_set('user_agent', "PHP\r\nX-MyCustomHeader: Foo");
|
||||
|
||||
$fp = fopen('http://www.example.com/index.php', 'r');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>送信されるリクエストは次のようになります。</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
GET /index.php HTTP/1.0
|
||||
Host: www.example.com
|
||||
User-Agent: PHP
|
||||
X-MyCustomHeader: Foo
|
||||
]]>
|
||||
</screen>
|
||||
</example><!-- }}} -->
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="notes"><!-- {{{ -->
|
||||
&reftitle.notes;
|
||||
<note>
|
||||
<simpara>
|
||||
HTTPS がサポートされるのは、<link linkend="book.openssl">openssl</link>
|
||||
拡張モジュールが有効な場合のみです。
|
||||
</simpara>
|
||||
</note>
|
||||
<simpara>
|
||||
HTTP 接続は読み込みのみ可で、HTTP リソースにデータを書き込んだり
|
||||
ファイルをコピーしたりすることはできません。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
113
language/wrappers/phar.xml
Normal file
113
language/wrappers/phar.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.phar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>phar://</refname>
|
||||
<refpurpose>PHP アーカイブ</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<simpara>
|
||||
<filename>phar://</filename> ストリームラッパーは PHP 5.3.0 以降で使用可能です。
|
||||
詳細は <link linkend="phar.using.stream">Phar ストリームラッパー</link>
|
||||
を参照ください。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>phar://</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-include">allow_url_include</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
312
language/wrappers/php.xml
Normal file
312
language/wrappers/php.xml
Normal file
@@ -0,0 +1,312 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.php" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>PHP 入出力</refname>
|
||||
<refpurpose>さまざまな入出力ストリームへのアクセス</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
<filename>php://stdin</filename>、<filename>php://stdout</filename>
|
||||
および <filename>php://stderr</filename> は、PHP プロセスの
|
||||
対応する入出力ストリームへの直接アクセスを許可します。
|
||||
これらのストリームは複製されたファイル記述子を参照します。そのため、
|
||||
<filename>php://stdin</filename> をオープンしたあとでそれを閉じたとしても、
|
||||
識別子のコピーが閉じられるだけです。<constant>STDIN</constant>
|
||||
で参照される実際のストリームは何も影響を受けません。
|
||||
PHP 5.2.1 より前のバージョンでは、これに関連する挙動にバグがあります。
|
||||
これらのラッパーを使うのではなく、定数
|
||||
<constant>STDIN</constant>, <constant>STDOUT</constant>
|
||||
および <constant>STDERR</constant> を使用することを推奨します。
|
||||
</para>
|
||||
<simpara>
|
||||
<filename>php://output</filename> は、
|
||||
<function>print</function> および <function>echo</function>
|
||||
と同じ方法での出力バッファへの書き込みを許可します。
|
||||
</simpara>
|
||||
<simpara>
|
||||
<filename>php://input</filename> は、リクエストの body 部から生のデータを読み込むことができます。
|
||||
POST リクエストの場合は <varname>$HTTP_RAW_POST_DATA</varname>
|
||||
よりもこちらを使うのが望ましいでしょう。&php.ini; ディレクティブの設定に依存しないからです。
|
||||
さらに、<varname>$HTTP_RAW_POST_DATA</varname> がデフォルトで設定されない場合は、
|
||||
<link linkend="ini.always-populate-raw-post-data">always_populate_raw_post_data</link>
|
||||
を有効にするよりも <varname>$HTTP_RAW_POST_DATA</varname>
|
||||
を使うほうがメモリの消費量が少なくなるでしょう。
|
||||
<filename>php://input</filename> は、
|
||||
<literal>enctype="multipart/form-data"</literal> に対しては使用できません。
|
||||
</simpara>
|
||||
<note>
|
||||
<simpara>
|
||||
<filename>php://input</filename> でオープンしたストリームは、は一度しか読み込めません。
|
||||
また、このストリームは seek 操作をサポートしていません。
|
||||
しかし、SAPI の実装によっては、別の <filename>php://input</filename>
|
||||
ストリームをオープンして読み込みを再開できる可能性もあります。
|
||||
これは、リクエストの body 部のデータが保存されている場合にのみ可能となります。
|
||||
通常、POST リクエストの場合はそのようになりますが、
|
||||
PUT や PROPFIND といった他のメソッドの場合は保存されません。
|
||||
</simpara>
|
||||
</note>
|
||||
<simpara>
|
||||
<filename>php://stdin</filename> および
|
||||
<filename>php://input</filename> は読み込み専用で、
|
||||
<filename>php://stdout</filename>、
|
||||
<filename>php://stderr</filename> および
|
||||
<filename>php://output</filename> は書き込み専用です。
|
||||
</simpara>
|
||||
|
||||
<simpara>
|
||||
<filename>php://filter</filename> は、フィルタアプリケーションが
|
||||
ストリームをオープンすることを許可するために設計されたメタラッパーです。
|
||||
これは、<function>readfile</function>、<function>file</function>
|
||||
および <function>file_get_contents</function> のようなオールインワンの
|
||||
ファイル関数とともに使用すると有用です。これらの関数には、コンテンツが
|
||||
読み込まれる前にストリームにフィルタを適用する手段がありません。
|
||||
</simpara>
|
||||
<simpara>
|
||||
<filename>php://filter</filename> の対象は、以下のように
|
||||
'parameters' を 'path' の一部として保持します。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>php://stdin</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>php://stdout</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>php://stderr</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>php://output</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>php://input</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>php://filter</filename> (PHP 5.0.0 以降で使用可能)</simpara></listitem>
|
||||
<listitem><simpara><filename>php://memory</filename> (PHP 5.1.0 以降で使用可能)</simpara></listitem>
|
||||
<listitem><simpara><filename>php://temp</filename> (PHP 5.1.0 以降で使用可能)</simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>
|
||||
ラッパーの概要(<literal>php://filter</literal> については、
|
||||
フィルタされる側のラッパーの概要を参照します)
|
||||
</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-include">allow_url_include</link> で制約される</entry>
|
||||
<entry>
|
||||
<literal>php://input</literal>、
|
||||
<literal>php://stdin</literal>、
|
||||
<literal>php://memory</literal> および
|
||||
<literal>php://temp</literal> のみ。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>
|
||||
<literal>php://stdin</literal>、
|
||||
<literal>php://input</literal>、
|
||||
<literal>php://memory</literal> および
|
||||
<literal>php://temp</literal> のみ。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>
|
||||
<literal>php://stdout</literal>、
|
||||
<literal>php://stderr</literal>、
|
||||
<literal>php://output</literal>、
|
||||
<literal>php://memory</literal> および
|
||||
<literal>php://temp</literal> のみ。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>
|
||||
<literal>php://stdout</literal>、
|
||||
<literal>php://stderr</literal>、
|
||||
<literal>php://output</literal>、
|
||||
<literal>php://memory</literal> および
|
||||
<literal>php://temp</literal> のみ (書き込みと同じ)。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>
|
||||
<literal>php://memory</literal> および
|
||||
<literal>php://temp</literal> のみ。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>
|
||||
<literal>php://memory</literal> および
|
||||
<literal>php://temp</literal> のみ。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stream_select</function> のサポート</entry>
|
||||
<entry>
|
||||
<literal>php://stdin</literal>, <literal>php://stdout</literal>,
|
||||
<literal>php://stderr</literal> および <literal>php://temp</literal>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example><!-- {{{ -->
|
||||
<title>/resource=<フィルタの対象となるストリーム> (<emphasis>必須</emphasis>)</title>
|
||||
<para>
|
||||
このパラメータは、
|
||||
<filename>php://filter</filename> 指定の最後に存在し、フィルタリング
|
||||
したいストリームを指している必要があります。
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* これは単純に以下と同じです。
|
||||
readfile("http://www.example.com");
|
||||
なぜなら、実際のところ何のフィルタ処理も行われないからです。 */
|
||||
|
||||
readfile("php://filter/resource=http://www.example.com");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example><!-- }}} -->
|
||||
<example><!-- {{{ -->
|
||||
<title>/read=<読み込みチェーンに適用するフィルタのリスト> (<emphasis>任意</emphasis>)</title>
|
||||
<para>
|
||||
このパラメータは 1 つ以上のフィルタ名を
|
||||
パラメータとしてとり、それらはパイプ文字 <literal>|</literal> で区切られます。
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* これは、www.example.com のすべての内容を
|
||||
大文字に変換して出力します。 */
|
||||
readfile("php://filter/read=string.toupper/resource=http://www.example.com");
|
||||
|
||||
/* これは上の例と同じですが、それに加えて
|
||||
ROT13 エンコード処理を行います。 */
|
||||
readfile("php://filter/read=string.toupper|string.rot13/resource=http://www.example.com");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example><!-- }}} -->
|
||||
<example><!-- {{{ -->
|
||||
<title>/write=<書き込みチェーンに適用するフィルタのリスト> (<emphasis>任意</emphasis>)</title>
|
||||
<para>
|
||||
このパラメータは 1 つ以上のフィルタ名を
|
||||
パラメータとしてとり、それらはパイプ文字 <literal>|</literal> で区切られます。
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* これは、文字列 "Hello World"
|
||||
に対して rot13 フィルタを適用し、カレントディレクトリの
|
||||
example.txt に書き込みます。 */
|
||||
file_put_contents("php://filter/write=string.rot13/resource=example.txt","Hello World");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example><!-- }}} -->
|
||||
<!-- {{{ -->
|
||||
<simpara>
|
||||
<literal>/<両方のチェーンに適用するフィルタのリスト></literal>
|
||||
(<emphasis>任意</emphasis>)<literal>read=</literal> あるいは
|
||||
<literal>write=</literal> の指定をされていないすべてのフィルタは、
|
||||
読み込みチェーンと書き込みチェーンの両方に(適宜)適用されます。
|
||||
</simpara>
|
||||
|
||||
<simpara>
|
||||
<filename>php://memory</filename> ラッパーは、データをメモリに保存します。
|
||||
<filename>php://temp</filename> も同様ですが、メモリの制限
|
||||
(デフォルトは 2 MB です) を超過した際にはテンポラリファイルを使用します。
|
||||
</simpara>
|
||||
<simpara>
|
||||
<filename>php://temp</filename> ラッパーは、次の
|
||||
'parameters' を 'path' の一部として受け付けます。
|
||||
</simpara>
|
||||
<!-- }}} -->
|
||||
<example><!-- {{{ -->
|
||||
<title>/maxmemory:<バイト数> (<emphasis>任意</emphasis>)</title>
|
||||
<para>
|
||||
このパラメータは、メモリの制限 (データをテンポラリファイルに移動する閾値)
|
||||
のデフォルト値を変更します。
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fiveMBs = 5 * 1024 * 1024;
|
||||
$fp = fopen("php://temp/maxmemory:$fiveMBs", 'r+');
|
||||
|
||||
fputs($fp, "hello\n");
|
||||
|
||||
// 先ほど書き込んだデータを読み込みます。
|
||||
rewind($fp);
|
||||
echo stream_get_contents($fp);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example><!-- }}} -->
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
305
language/wrappers/rar.xml
Normal file
305
language/wrappers/rar.xml
Normal file
@@ -0,0 +1,305 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.rar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>rar://</refname>
|
||||
<refpurpose>RAR</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
このラッパーが受け取るのは、RAR アーカイブへの URL エンコードされたパス
|
||||
(絶対パスあるいは相対パス)、そしてオプションでアスタリスク
|
||||
(<literal>*</literal>)、番号記号 (<literal>#</literal>)、
|
||||
アーカイブ内のエントリ名です。エントリ名を指定する場合は番号記号が必須となります。
|
||||
エントリ名の先頭のスラッシュは必須ではありません。
|
||||
</para>
|
||||
|
||||
<simpara>
|
||||
このラッパーは、ファイルだけでなくディレクトリも開くことができます。
|
||||
ディレクトリを開く際にアスタリスクを使うと、
|
||||
返されるディレクトリエントリ名はエンコードされていない状態となります。
|
||||
アスタリスクを指定しなかった場合は URL エンコードしたものを返します。
|
||||
これは、<type>RecursiveDirectoryIterator</type> などの組み込み機能で
|
||||
このラッパーをファイル名の代わりに正しく使えるようにするためです。
|
||||
</simpara>
|
||||
|
||||
<simpara>
|
||||
番号記号とエントリ名の部分が含まれていない場合は、アーカイブのルートを表示します。
|
||||
これは通常のディレクトリとは異なり、
|
||||
返されるストリームには更新時刻などの情報が含まれません。
|
||||
ルートディレクトリは、アーカイブの個別のエントリとして存在するわけではないからです。
|
||||
このラッパーを <type>RecursiveDirectoryIterator</type> で使う場合、
|
||||
ルートにアクセスするには URL に番号記号を含めなければなりません。
|
||||
そうすれば、子要素の URL も正しく作られます。
|
||||
</simpara>
|
||||
<note>
|
||||
<title>このラッパーはデフォルトでは有効になっていません</title>
|
||||
<simpara>
|
||||
<filename>rar://</filename> ラッパーを使用するには、
|
||||
<link xlink:href="&url.pecl;">PECL</link> から
|
||||
<link xlink:href="&url.pecl.package;rar">rar</link> 拡張モジュールを
|
||||
インストールする必要があります。
|
||||
</simpara>
|
||||
</note>
|
||||
<simpara>
|
||||
<filename>rar://</filename>
|
||||
は、PECL rar 3.0.0 以降で使用可能です。
|
||||
</simpara>
|
||||
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>rar://<url encoded archive name>[*][#[<url encoded entry name>]]</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>サポートの有無</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-include">allow_url_include</link> で制約される</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
|
||||
<!-- FIXME: This should be context.rar ! -->
|
||||
<para>
|
||||
<table>
|
||||
<title>コンテキストオプション</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>名前</entry>
|
||||
<entry>使用法</entry>
|
||||
<entry>デフォルト</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>open_password</literal></entry>
|
||||
<entry>
|
||||
アーカイブのヘッダを暗号化するときに使うパスワード。
|
||||
WinRAR では、ヘッダの暗号が設定されている場合はすべてのファイルを同じパスワードで暗号化します。
|
||||
そのため、ヘッダが暗号化されているアーカイブでは
|
||||
<literal>file_password</literal> は無視されます。
|
||||
</entry>
|
||||
<entry/>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>file_password</literal></entry>
|
||||
<entry>
|
||||
ファイルを暗号化するときに使うパスワード。
|
||||
ヘッダが暗号化されている場合はこの設定は無視され、かわりに
|
||||
<literal>open_password</literal> の値を使います。
|
||||
ふたつのオプションがある理由は、
|
||||
ヘッダとファイルを別々のパスワードで暗号化する可能性に対応するためです。
|
||||
アーカイブのヘッダが暗号化されていない場合は
|
||||
<literal>open_password</literal> は無視され、
|
||||
このオプションを使わなければならないことに注意しましょう。
|
||||
</entry>
|
||||
<entry/>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>volume_callback</literal></entry>
|
||||
<entry>
|
||||
存在しないボリュームのパスを決めるために使うコールバック。詳細は
|
||||
<methodname>RarArchive::open</methodname> を参照ください。
|
||||
</entry>
|
||||
<entry/>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>RAR アーカイブの走査</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
class MyRecDirIt extends RecursiveDirectoryIterator {
|
||||
function current() {
|
||||
return rawurldecode($this->getSubPathName()) .
|
||||
(is_dir(parent::current())?" [DIR]":"");
|
||||
}
|
||||
}
|
||||
|
||||
$f = "rar://" . rawurlencode(dirname(__FILE__)) .
|
||||
DIRECTORY_SEPARATOR . 'dirs_and_extra_headers.rar#';
|
||||
|
||||
$it = new RecursiveTreeIterator(new MyRecDirIt($f));
|
||||
|
||||
foreach ($it as $s) {
|
||||
echo $s, "\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
|-allow_everyone_ni [DIR]
|
||||
|-file1.txt
|
||||
|-file2_אּ.txt
|
||||
|-with_streams.txt
|
||||
\-אּ [DIR]
|
||||
|-אּ\%2Fempty%2E [DIR]
|
||||
| \-אּ\%2Fempty%2E\file7.txt
|
||||
|-אּ\empty [DIR]
|
||||
|-אּ\file3.txt
|
||||
|-אּ\file4_אּ.txt
|
||||
\-אּ\אּ_2 [DIR]
|
||||
|-אּ\אּ_2\file5.txt
|
||||
\-אּ\אּ_2\file6_אּ.txt
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<title>暗号化されたファイルのオープン (ヘッダの暗号化)</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$stream = fopen("rar://" .
|
||||
rawurlencode(dirname(__FILE__)) . DIRECTORY_SEPARATOR .
|
||||
'encrypted_headers.rar' . '#encfile1.txt', "r", false,
|
||||
stream_context_create(
|
||||
array(
|
||||
'rar' =>
|
||||
array(
|
||||
'open_password' => 'samplepassword'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
var_dump(stream_get_contents($stream));
|
||||
/* 作成日や最終更新日は WinRAR では選択式になっています。
|
||||
* そのため、多くのファイルには含まれていません */
|
||||
var_dump(fstat($stream));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(26) "Encrypted file 1 contents."
|
||||
Array
|
||||
(
|
||||
[0] => 0
|
||||
[1] => 0
|
||||
[2] => 33206
|
||||
[3] => 1
|
||||
[4] => 0
|
||||
[5] => 0
|
||||
[6] => 0
|
||||
[7] => 26
|
||||
[8] => 0
|
||||
[9] => 1259550052
|
||||
[10] => 0
|
||||
[11] => -1
|
||||
[12] => -1
|
||||
[dev] => 0
|
||||
[ino] => 0
|
||||
[mode] => 33206
|
||||
[nlink] => 1
|
||||
[uid] => 0
|
||||
[gid] => 0
|
||||
[rdev] => 0
|
||||
[size] => 26
|
||||
[atime] => 0
|
||||
[mtime] => 1259550052
|
||||
[ctime] => 0
|
||||
[blksize] => -1
|
||||
[blocks] => -1
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
276
language/wrappers/ssh2.xml
Normal file
276
language/wrappers/ssh2.xml
Normal file
@@ -0,0 +1,276 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 0cc3ec82158dbc3a74069483994f99dd640b9350 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: hirokawa -->
|
||||
|
||||
<refentry xml:id="wrappers.ssh2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>ssh2://</refname>
|
||||
<refpurpose>Secure Shell 2</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<para>
|
||||
<filename>ssh2.shell://</filename>
|
||||
<filename>ssh2.exec://</filename>
|
||||
<filename>ssh2.tunnel://</filename>
|
||||
<filename>ssh2.sftp://</filename>
|
||||
<filename>ssh2.scp://</filename>
|
||||
PHP 4.3.0 以降(PECL)
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<title>このラッパーはデフォルトでは有効になっていません</title>
|
||||
<simpara>
|
||||
<filename>ssh2.*://</filename> ラッパーを使用するには、
|
||||
<link xlink:href="&url.pecl;">PECL</link> から
|
||||
<link xlink:href="&url.pecl.package;ssh2">SSH2</link> 拡張モジュールを
|
||||
インストールする必要があります。
|
||||
</simpara>
|
||||
</note>
|
||||
|
||||
<simpara>
|
||||
ssh2 ラッパーでは、URL のホスト部分に接続リソースを渡すことで既にオープン
|
||||
している接続を再利用することが可能です。
|
||||
</simpara>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="usage"> <!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<itemizedlist>
|
||||
<listitem><simpara><filename>ssh2.shell://user:pass@example.com:22/xterm</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ssh2.exec://user:pass@example.com:22/usr/local/bin/somecmd</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ssh2.tunnel://user:pass@example.com:22/192.168.0.1:14</filename></simpara></listitem>
|
||||
<listitem><simpara><filename>ssh2.sftp://user:pass@example.com:22/path/to/filename</filename></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<table>
|
||||
<title>ラッパーの概要</title>
|
||||
<tgroup cols="6">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>属性</entry>
|
||||
<entry>ssh2.shell</entry>
|
||||
<entry>ssh2.exec</entry>
|
||||
<entry>ssh2.tunnel</entry>
|
||||
<entry>ssh2.sftp</entry>
|
||||
<entry>ssh2.scp</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.allow-url-fopen">allow_url_fopen</link> で制約される</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>読み込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>書き込み許可</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>追加許可</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes(サーバがサポートしている場合)</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>同時読み書き許可</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>stat</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>unlink</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rename</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>mkdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><function>rmdir</function> のサポート</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry>No</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- FIXME: This should be context.ssh2!!! -->
|
||||
<para>
|
||||
<table>
|
||||
<title>コンテキストオプション</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>名前</entry>
|
||||
<entry>使用法</entry>
|
||||
<entry>デフォルト</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>session</literal></entry>
|
||||
<entry>再利用する接続済みの ssh2 リソース</entry>
|
||||
<entry/>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>sftp</literal></entry>
|
||||
<entry>再利用する割り当て済みの sftp リソース</entry>
|
||||
<entry/>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>methods</literal></entry>
|
||||
<entry>Key exchange, hostkey, cipher, compression, および MAC methods</entry>
|
||||
<entry/>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>callbacks</literal></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>username</literal></entry>
|
||||
<entry>接続するユーザ名</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>password</literal></entry>
|
||||
<entry>パスワード認証に使用するパスワード</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>pubkey_file</literal></entry>
|
||||
<entry>認証に使用する公開鍵ファイル</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>privkey_file</literal></entry>
|
||||
<entry>認証に使用する秘密鍵ファイル</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>env</literal></entry>
|
||||
<entry>設定する環境変数の連想配列</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>term</literal></entry>
|
||||
<entry>pty を割り当てる際の端末エミュレート方式</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>term_width</literal></entry>
|
||||
<entry>pty を割り当てる際の端末の幅</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>term_height</literal></entry>
|
||||
<entry>pty を割り当てる際の端末の高さ</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>term_units</literal></entry>
|
||||
<entry>term_width および term_height の単位</entry>
|
||||
<entry><constant>SSH2_TERM_UNIT_CHARS</constant></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1> <!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>アクティブな接続からストリームをオープンする</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$session = ssh2_connect('example.com', 22);
|
||||
ssh2_auth_pubkey_file($session, 'username', '/home/username/.ssh/id_rsa.pub',
|
||||
'/home/username/.ssh/id_rsa', 'secret');
|
||||
$stream = fopen("ssh2.tunnel://$session/remote.example.com:1234", 'r');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user