mirror of
https://github.com/php/doc-ja.git
synced 2026-04-27 18:13:11 +02:00
d36b769ad6
Closes GH-235. git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@351660 c90b9560-bf6c-de11-be94-00142212c4b1
123 lines
4.0 KiB
XML
123 lines
4.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 02ba67b51f2bde571b6ce07026e935f4e81019af Maintainer: hirokawa Status: ready -->
|
|
<!-- CREDITS: shimooka -->
|
|
<refentry xml:id="function.gzopen" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>gzopen</refname>
|
|
<refpurpose>gz ファイルを開く</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>resource</type><type>false</type></type><methodname>gzopen</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
読み込みもしくは書き込みのために gzip (.gz) ファイルをオープンします。
|
|
</para>
|
|
<para>
|
|
<function>gzopen</function> は、gzip
|
|
フォーマットでないファイルの読み込みについても使用することができます。
|
|
この場合、<function>gzread</function>は、ファイルを解凍せずに直接読み
|
|
込まれます。
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>filename</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
ファイル名を指定します
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>mode</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<function>fopen</function> と同じ (<literal>rb</literal> または
|
|
<literal>wb</literal>) ですが、
|
|
圧縮レベル (<literal>wb9</literal>) または圧縮の方策、
|
|
つまり、<literal>wb6f</literal> のようにフィルターを通したデータを
|
|
<literal>f</literal> で指定したり、<literal>h</literal>
|
|
でハフマン圧縮のみを行うことを指定したりすることができます
|
|
(方策に関するパラメータの詳細については、<filename>zlib.h</filename>
|
|
の中の <literal>deflateInit2</literal> の説明を参照ください)。
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>use_include_path</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
このオプションパラメータを <literal>1</literal> にすることにより、
|
|
<link linkend="ini.include-path">include_path</link>にあるファイルも
|
|
検索することができます。
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
オープンしたファイルへのファイルポインタを返します。その後、
|
|
このファイルディスクプリタから読み込んだ全ては透過的に解凍され、
|
|
書き込んだものは圧縮されます。
|
|
</para>
|
|
<para>
|
|
オープンに失敗した場合、この関数は &false; を返します。
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>gzopen</function> の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$fp = gzopen("/tmp/file.gz", "r");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>gzclose</function></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|