cvs: phpdoc-ro / INFO_FOR_TRANSLATORS /reference/java .cvsignore ini.xml reference.xml /reference/java/functions java-last-exception-clear.xml
java-last-exception-get.xml /reference/zlib .cvsignore constants.xml ini.xml reference.xml /reference/zlib/functions gzclose.xml gzcompress.xml
gzdeflate.xml gzencode.xml gzeof.xml gzfile.xml gzgetc.xml gzgets.xml gzgetss.xml gzinflate.xml gzopen.xml gzpassthru.xml gzputs.xml gzread.xml
gzrewind.xml gzseek.xml gztell.xml gzuncompress.xml gzwrite.xml readgzfile.xml

From: Date: Thu, 03 Oct 2002 13:30:26 +0000
Subject: cvs: phpdoc-ro / INFO_FOR_TRANSLATORS /reference/java .cvsignore ini.xml reference.xml /reference/java/functions java-last-exception-clear.xml
java-last-exception-get.xml /reference/zlib .cvsignore constants.xml ini.xml reference.xml /reference/zlib/functions gzclose.xml gzcompress.xml
gzdeflate.xml gzencode.xml gzeof.xml gzfile.xml gzgetc.xml gzgets.xml gzgetss.xml gzinflate.xml gzopen.xml gzpassthru.xml gzputs.xml gzread.xml
gzrewind.xml gzseek.xml gztell.xml gzuncompress.xml gzwrite.xml readgzfile.xml
Groups: php.doc.ro 
Request: Send a blank email to doc-ro+get-8@lists.php.net to get a copy of this message
aspinei Thu Oct 3 09:30:26 2002 EDT Added files: /phpdoc-ro/reference/java .cvsignore ini.xml reference.xml /phpdoc-ro/reference/java/functions java-last-exception-clear.xml java-last-exception-get.xml /phpdoc-ro/reference/zlib .cvsignore constants.xml ini.xml reference.xml /phpdoc-ro/reference/zlib/functions gzclose.xml gzcompress.xml gzdeflate.xml gzencode.xml gzeof.xml gzfile.xml gzgetc.xml gzgets.xml gzgetss.xml gzinflate.xml gzopen.xml gzpassthru.xml gzputs.xml gzread.xml gzrewind.xml gzseek.xml gztell.xml gzuncompress.xml gzwrite.xml readgzfile.xml Modified files: /phpdoc-ro INFO_FOR_TRANSLATORS Log: added java and zlib chapters, updated translators info

Index: phpdoc-ro/INFO_FOR_TRANSLATORS diff -u phpdoc-ro/INFO_FOR_TRANSLATORS:1.11 phpdoc-ro/INFO_FOR_TRANSLATORS:1.12 --- phpdoc-ro/INFO_FOR_TRANSLATORS:1.11 Mon Jul 22 08:07:03 2002 +++ phpdoc-ro/INFO_FOR_TRANSLATORS Thu Oct 3 09:30:24 2002 @@ -5,23 +5,25 @@ File Translator State -------------------------------------------- ------------------ ------------- ./features/http-auth.xml bbd 5% -./language-defs.ent dt Done -./language-snippets.ent spooky Done -./bookinfo.xml adiju Done -./make_chm_index_ro.html adiju Done -./chmonly/aboutchm.xml adiju Done -./functions/array.xml adiju 15% -./functions/mail.xml adiju Done -./preface.xml adiju Done -./function/datetime.xml adiju 100% -./functions/apache.xml adiju 100% -../../ZendAPI/ro/manual.xml dorel nastasa 100% -../../ZendAPI/ro/Extending_Zend.xml dorel nastasa 100% -../../ZendAPI/ro/Extending_Zend_Introduction.xml dorel nastasa 100% -../../ZendAPI/ro/Extending_Zend_Overview.xml dorel nastasa 100% -./function/errorfunc.xml adrian_ciutureanu 100% -./function/wddx.xml aspinei 100% -./function/xmlrpc.xml aspinei 5% -./function/domxml.xml aspinei 0% -./chapters/intro.xml spooky 100% -./chapter/installation.xml spooky 0% \ No newline at end of file +./language-defs.ent dt 100% +./language-snippets.ent spooky 100% +./bookinfo.xml adiju 100% +./make_chm_index_ro.html adiju 100% +./chmonly/aboutchm.xml adiju 100% +./reference/array adiju 15% +./reference/mail adiju 100% +./preface.xml adiju 100% +./reference/datetime adiju 100% +./reference/apache adiju 100% +../../ZendAPI/ro/manual.xml dorel nastasa 100% +../../ZendAPI/ro/Extending_Zend.xml dorel nastasa 100% +../../ZendAPI/ro/Extending_Zend_Introduction.xml dorel nastasa 100% +../../ZendAPI/ro/Extending_Zend_Overview.xml dorel nastasa 100% +./reference/errorfunc adrian_ciutureanu 100% +./reference/wddx aspinei 100% +./reference/xmlrpc aspinei 100% +./reference/domxml aspinei 0% - marked as unstable, should translate ?!? +./chapters/intro.xml spooky 100% +./chapter/installation.xml spooky 0% +./reference/java aspinei 0% +./reference/zlib aspinei 0% \ No newline at end of file Index: phpdoc-ro/reference/java/.cvsignore +++ phpdoc-ro/reference/java/.cvsignore functions.xml Index: phpdoc-ro/reference/java/ini.xml +++ phpdoc-ro/reference/java/ini.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <section id="java.configuration"> &reftitle.runtime; &extension.runtime; <para> <table> <title>Java configuration options</title> <tgroup cols="3"> <thead> <row> <entry>Name</entry> <entry>Default</entry> <entry>Changeable</entry> </row> </thead> <tbody> <row> <entry>java.class.path</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> </row> <row> <entry>java.home</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> </row> <row> <entry>java.library.path</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> </row> <row> <entry>java.library</entry> <entry>JAVALIB</entry> <entry>PHP_INI_ALL</entry> </row> </tbody> </tgroup> </table> For further details and definition of the PHP_INI_* constants see <function>ini_set</function>. </para> </section> <!-- 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:"../../../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 --> Index: phpdoc-ro/reference/java/reference.xml +++ phpdoc-ro/reference/java/reference.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <reference id="ref.java"> <title>PHP / Java Integration</title> <titleabbrev>Java</titleabbrev> <partintro> <section id="java.intro"> &reftitle.intro; <para> There are two possible ways to bridge PHP and Java: you can either <link linkend="java.servlet">integrate PHP into a Java Servlet environment</link>, which is the more stable and efficient solution, or integrate Java support into PHP. The former is provided by a SAPI module that interfaces with the Servlet server, the latter by this Java extension. </para> <para> The Java extension provides a simple and effective means for creating and invoking methods on Java objects from PHP. The JVM is created using JNI, and everything runs in-process. </para> &warn.experimental; </section> <section id="java.requirements"> &reftitle.required; <para> You need a Java VM installed on your machine to use this extension. </para> </section> <section id="java.installation"> &reftitle.install; <para> Build instructions for this extension can be found in <filename>php4/ext/java/README</filename>. </para> </section> <!-- <section id="java.configuration"> &reftitle.runtime; <para> The &php.ini; settings involved in configuring the Java extension are <literal>java.library.path</literal> and <literal>java.class.path</literal>. </para> </section> --> &reference.java.ini; <section id="java.resources"> &reftitle.resources; &no.resource; </section> <section id="java.constants"> &reftitle.constants; &no.constants; </section> <section id="java.examples"> &reftitle.examples; <para> <example> <title>Java Example</title> <programlisting role="php"> <![CDATA[ <?php // get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); // demonstrate property access print 'Java version='.$system->getProperty('java.version').' <br>'; print 'Java vendor=' .$system->getProperty('java.vendor').' <br>'; print 'OS='.$system->getProperty('os.name').' '. $system->getProperty('os.version').' on '. $system->getProperty('os.arch').' <br>'; // java.util.Date example $formatter = new Java('java.text.SimpleDateFormat', "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz"); print $formatter->format(new Java('java.util.Date')); ?> ]]> </programlisting> </example> <example> <title>AWT Example</title> <programlisting role="php"> <![CDATA[ <?php // This example is only intented to be run as a CGI. $frame = new Java('java.awt.Frame', 'PHP'); $button = new Java('java.awt.Button', 'Hello Java World!'); $frame->add('North', $button); $frame->validate(); $frame->pack(); $frame->visible = True; $thread = new Java('java.lang.Thread'); $thread->sleep(10000); $frame->dispose(); ?> ]]> </programlisting> </example> Notes: <itemizedlist> <listitem> <simpara> <literal>new Java()</literal> will create an instance of a class if a suitable constructor is available. If no parameters are passed and the default constructor is useful as it provides access to classes like <literal>java.lang.System</literal> which expose most of their functionallity through static methods. </simpara> </listitem> <listitem> <simpara> Accessing a member of an instance will first look for bean properties then public fields. In other words, <literal>print $date.time</literal> will first attempt to be resolved as <literal>$date.getTime()</literal>, then as <literal>$date.time</literal>. </simpara> </listitem> <listitem> <simpara> Both static and instance members can be accessed on an object with the same syntax. Furthermore, if the java object is of type <literal>java.lang.Class</literal>, then static members of the class (fields and methods) can be accessed. </simpara> </listitem> <listitem> <para> Exceptions raised result in PHP warnings, and &null; results. The warnings may be eliminated by prefixing the method call with an "@" sign. The following APIs may be used to retrieve and reset the last error: <itemizedlist> <listitem><simpara><function>java_last_exception_get</function></simpara></listitem> <listitem><simpara><function>java_last_exception_clear</function></simpara></listitem> </itemizedlist> </para> </listitem> <listitem> <simpara> Overload resolution is in general a hard problem given the differences in types between the two languages. The PHP Java extension employs a simple, but fairly effective, metric for determining which overload is the best match. </simpara> <simpara> Additionally, method names in PHP are not case sensitive, potentially increasing the number of overloads to select from. </simpara> <simpara> Once a method is selected, the parameters are cooerced if necessary, possibly with a loss of data (example: double precision floating point numbers will be converted to boolean). <!-- FIXME Why aren't java-doubles converted to PHP-floats? Is this correct? --> </simpara> </listitem> <listitem> <simpara> In the tradition of PHP, arrays and hashtables may pretty much be used interchangably. Note that hashtables in PHP may only be indexed by integers or strings; and that arrays of primitive types in Java can not be sparse. Also note that these constructs are passed by value, so may be expensive in terms of memory and time. </simpara> </listitem> </itemizedlist> </para> </section> <section id="java.servlet"> <title>Java Servlet SAPI</title> <para> The Java Servlet SAPI builds upon the mechanism defined by the Java extension to enable the entire PHP processor to be run as a servlet. The primary advanatage of this from a PHP perspective is that web servers which support servlets typically take great care in pooling and reusing JVMs. Build instructions for the Servlet SAPI module can be found in <filename>php4/sapi/README</filename>. Notes: <itemizedlist> <listitem> <simpara> While this code is intended to be able to run on any servlet engine, it has only been tested on Apache's Jakarta/tomcat to date. Bug reports, success stories and/or patches required to get this code to run on other engines would be appreciated. </simpara> </listitem> <listitem> <simpara> PHP has a habit of changing the working directory. sapi/servlet will eventually change it back, but while PHP is running the servlet engine may not be able to load any classes from the CLASSPATH which are specified using a relative directory syntax, or find the work directory used for administration and JSP compilation tasks. </simpara> </listitem> </itemizedlist> </para> </section> </partintro> &reference.java.functions; </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:"../../../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 --> Index: phpdoc-ro/reference/java/functions/java-last-exception-clear.xml +++ phpdoc-ro/reference/java/functions/java-last-exception-clear.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/java.xml, last change in rev 1.1 --> <refentry id="function.java-last-exception-clear"> <refnamediv> <refname>java_last_exception_clear</refname> <refpurpose>Clear last Java exception</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>void</type><methodname>java_last_exception_clear</methodname> <void/> </methodsynopsis> &warn.experimental.func; <para> See <function>java_last_exception_get</function> for an example. </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:"../../../../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 --> Index: phpdoc-ro/reference/java/functions/java-last-exception-get.xml +++ phpdoc-ro/reference/java/functions/java-last-exception-get.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/java.xml, last change in rev 1.1 --> <refentry id="function.java-last-exception-get"> <refnamediv> <refname>java_last_exception_get</refname> <refpurpose>Get last Java exception</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>exception</type><methodname>java_last_exception_get</methodname> <void/> </methodsynopsis> &warn.experimental.func; <para> The following example demonstrates the usage of Java's exception handler from within PHP: <example> <title>Java exception handler</title> <programlisting role="php"> <![CDATA[ <?php $stack = new Java('java.util.Stack'); $stack->push(1); // This should succeed $result = $stack->pop(); $ex = java_last_exception_get(); if (!$ex) print "$result\n"; // This should fail (error suppressed by @) $result = @$stack->pop(); $ex = java_last_exception_get(); if ($ex) print $ex->toString(); // Clear last exception java_last_exception_clear(); ?> ]]> </programlisting> </example> </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/.cvsignore +++ phpdoc-ro/reference/zlib/.cvsignore functions.xml Index: phpdoc-ro/reference/zlib/constants.xml +++ phpdoc-ro/reference/zlib/constants.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <section id="zlib.constants"> &reftitle.constants; &extension.constants; <variablelist> <varlistentry> <term> <constant>FORCE_GZIP</constant> (<link linkend="language.types.integer">integer</link>) </term> <listitem> <simpara> </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>FORCE_DEFLATE</constant> (<link linkend="language.types.integer">integer</link>) </term> <listitem> <simpara> </simpara> </listitem> </varlistentry> </variablelist> </section> <!-- 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:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> Index: phpdoc-ro/reference/zlib/ini.xml +++ phpdoc-ro/reference/zlib/ini.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <section id="zlib.configuration"> &reftitle.runtime; &extension.runtime; <para> The zlib extension offers the option to transparently compress your pages on-the-fly, if the requesting browser supports this. Therefore there are three options in the <link linkend="configuration.file">configuration file</link> &php.ini;. <table> <title>Zlib Configuration Options</title> <tgroup cols="3"> <thead> <row> <entry>Name</entry> <entry>Default</entry> <entry>Changeable</entry> </row> </thead> <tbody> <row> <entry>zlib.output_compression</entry> <entry>"Off"</entry> <entry>PHP_INI_ALL</entry> </row> <row> <entry>zlib.output_compression_level</entry> <entry>"-1"</entry> <entry>PHP_INI_ALL</entry> </row> <row> <entry>zlib.output_handler</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> </row> </tbody> </tgroup> </table> For further details and definition of the PHP_INI_* constants see <function>ini_set</function>. </para> <para> Here is a short explanation of the configuration directives. <variablelist> <varlistentry id="ini.zlib.output-compression"> <term> <parameter>zlib.output_compression</parameter> <type>boolean</type>/<type>integer</type> </term> <listitem> <para> Whether to transparently compress pages. If this option is set to "On" in &php.ini; or the Apache configuration, pages are compressed if the browser sends an "Accept-Encoding: gzip" or "deflate" header. "Content-Encoding: gzip" (respectively "deflate") and "Vary: Accept-Encoding" headers are added to the output. </para> <para> You can use <function>ini_set</function> to disable this in your script if the headers aren't already sent. If you output a "Content-Type: image/" header the compression is disabled, too (in order to circumvent a Netscape bug). You can reenable it, if you add "ini_set('zlib.output_compression', 'On')" after the header call which added the image content-type. </para> <para> This option also accepts integer values instead of boolean "On"/"Off", using this you can set the output buffer size (default is 4KB). </para> <note> <para> <link linkend="ini.output-handler">output_handler</link> must be empty if this is set 'On' ! Instead you must use zlib.output_handler. </para> </note> </listitem> </varlistentry> <varlistentry id="ini.zlib.output-compression-level"> <term> <parameter>zlib.output_compression_level</parameter> <type>integer</type> </term> <listitem> <para> Compression level used for transparent output compression. </para> </listitem> </varlistentry> <varlistentry id="ini.zlib.output-handler"> <term> <parameter>zlib.output_handler</parameter> <type>string</type> </term> <listitem> <para> You cannot specify additional output handlers if zlib.output_compression is activated here. This setting does the same as <link linkend="ini.output-handler"> output_handler</link> but in a different order. </para> </listitem> </varlistentry> </variablelist> </para> </section> <!-- 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:"../../../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 --> Index: phpdoc-ro/reference/zlib/reference.xml +++ phpdoc-ro/reference/zlib/reference.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <reference id="ref.zlib"> <title>Zlib Compression Functions</title> <titleabbrev>Zlib</titleabbrev> <partintro> <section id="zlib.intro"> &reftitle.intro; <para> This module enables you to transparently read and write gzip (.gz) compressed files, through versions of most of the <link linkend="ref.filesystem">filesystem</link> functions which work with gzip-compressed files (and uncompressed files, too, but not with sockets). </para> <note> <para> Version 4.0.4 introduced a fopen-wrapper for .gz-files, so that you can use a special 'zlib:' URL to access compressed files transparently using the normal f*() file access functions if you prepend the filename or path with a 'zlib:' prefix when calling <function>fopen</function>. </para> <para> In version 4.3.0, this special prefix has been changed to 'zlib://' to prevent ambiguities with filenames containing ':'. </para> <para> This feature requires a C runtime library that provides the <literal>fopencookie()</literal> function. To my current knowledge the GNU libc is the only library that provides this feature. </para> </note> </section> <section id="zlib.requirements"> &reftitle.required; <para> This module uses the functions of <ulink url="&url.zlib;">zlib</ulink> by Jean-loup Gailly and Mark Adler. You have to use a zlib version &gt;= 1.0.9 with this module. </para> </section> &reference.zlib.ini; <section id="zlib.resources"> &reftitle.resources; &no.resource; </section> &reference.zlib.constants; <section id="zlib.examples"> &reftitle.examples; <para> This example opens a temporary file and writes a test string to it, then it prints out the content of this file twice. </para> <example> <title>Small Zlib Example</title> <programlisting role="php"> <![CDATA[ <?php $filename = tempnam ('/tmp', 'zlibtest').'.gz'; print "<html>\n<head></head>\n<body>\n<pre>\n"; $s = "Only a test, test, test, test, test, test, test, test!\n"; // open file for writing with maximum compression $zp = gzopen($filename, "w9"); // write string to file gzwrite($zp, $s); // close file gzclose($zp); // open file for reading $zp = gzopen($filename, "r"); // read 3 char print gzread($zp, 3); // output until end of the file and close it. gzpassthru($zp); print "\n"; // open file and print content (the 2nd time). if (readgzfile($filename) != strlen($s)) { echo "Error with zlib functions!"; } unlink($filename); print "</pre>\n</h1></body>\n</html>\n"; ?> ]]> </programlisting> </example> </section> </partintro> &reference.zlib.functions; </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:"../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzclose.xml +++ phpdoc-ro/reference/zlib/functions/gzclose.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzclose"> <refnamediv> <refname>gzclose</refname> <refpurpose>Close an open gz-file pointer</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gzclose</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> </methodsynopsis> <para> The gz-file pointed to by zp is closed. </para> <para> &return.success; </para> <para> The gz-file pointer must be valid, and must point to a file successfully opened by <function>gzopen</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzcompress.xml +++ phpdoc-ro/reference/zlib/functions/gzcompress.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.4 --> <refentry id="function.gzcompress"> <refnamediv> <refname>gzcompress</refname> <refpurpose>Compress a string</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzcompress</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>level</parameter></methodparam> </methodsynopsis> <para> This function returns a compressed version of the input <parameter>data</parameter> using the ZLIB data format, or &false; if an error is encountered. The optional parameter <parameter>level</parameter> can be given as 0 for no compression up to 9 for maximum compression. </para> <para> For details on the ZLIB compression algorithm see the document "<ulink url="&url.rfc1950;">ZLIB Compressed Data Format Specification version 3.3</ulink>" (RFC 1950). </para> <note> <para> This is <emphasis>not</emphasis> the same as gzip compression, which includes some header data. See <function>gzencode</function> for gzip compression. </para> </note> <para> See also <function>gzdeflate</function>, <function>gzinflate</function>, <function>gzuncompress</function>, <function>gzencode</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzdeflate.xml +++ phpdoc-ro/reference/zlib/functions/gzdeflate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.11 --> <refentry id="function.gzdeflate"> <refnamediv> <refname>gzdeflate</refname> <refpurpose>Deflate a string</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzdeflate</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>level</parameter></methodparam> </methodsynopsis> <para> This function returns a compressed version of the input <parameter>data</parameter> using the DEFLATE data format, or &false; if an error is encountered. The optional parameter <parameter>level</parameter> can be given as 0 for no compression up to 9 for maximum compression. </para> <para> For details on the DEFLATE compression algorithm see the document "<ulink url="&url.rfc1951;">DEFLATE Compressed Data Format Specification version 1.3</ulink>" (RFC 1951). </para> <para> See also <function>gzinflate</function>, <function>gzcompress</function>, <function>gzuncompress</function>, <function>gzencode</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzencode.xml +++ phpdoc-ro/reference/zlib/functions/gzencode.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.4 --> <refentry id="function.gzencode"> <refnamediv> <refname>gzencode</refname> <refpurpose>Create a gzip compressed string</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzencode</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>level</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>encoding_mode</parameter></methodparam> </methodsynopsis> <para> This function returns a compressed version of the input <parameter>data</parameter> compatible with the output of the <command>gzip</command> program, or &false; if an error is encountered. The optional parameter <parameter>level</parameter> can be given as 0 for no compression up to 9 for maximum compression, if not given the default compression level will be the default compression level of the zlib library. </para> <para> You can also give <constant>FORCE_GZIP</constant> (the default) or <constant>FORCE_DEFLATE</constant> as optional third paramter <parameter>encoding_mode</parameter>. If you use <constant>FORCE_DEFLATE</constant>, you get a standard zlib deflated string (inclusive zlib headers) after the gzip file header but without the trailing crc32 checksum. <note> <para> <parameter>level</parameter> was added in PHP 4.2, before PHP 4.2 <function>gzencode</function> only had the <parameter>data</parameter> and (optional) <parameter>encoding_mode</parameter> parameters.. </para> </note> </para> <para> The resulting data contains the appropriate headers and data structure to make a standard .gz file, e.g.: <example> <title>Creating a gzip file</title> <programlisting role="php"> <![CDATA[ <?php $data = implode("", file("bigfile.txt")); $gzdata = gzencode($data, 9); $fp = fopen("bigfile.txt.gz", "w"); fwrite($fp, $gzdata); fclose($fp); ?> ]]> </programlisting> </example> </para> <para> For more information on the GZIP file format, see the document: <ulink url="&url.rfc1952;">GZIP file format specification version 4.3</ulink> (RFC 1952). </para> <para> See also <function>gzcompress</function>. <function>gzuncompress</function>, <function>gzdeflate</function>, <function>gzinflate</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzeof.xml +++ phpdoc-ro/reference/zlib/functions/gzeof.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzeof"> <refnamediv> <refname>gzeof</refname> <refpurpose>Test for end-of-file on a gz-file pointer</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gzeof</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> </methodsynopsis> <para> Returns &true; if the gz-file pointer is at EOF or an error occurs; otherwise returns &false;. </para> <para> The gz-file pointer must be valid, and must point to a file successfully opened by <function>gzopen</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzfile.xml +++ phpdoc-ro/reference/zlib/functions/gzfile.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzfile"> <refnamediv> <refname>gzfile</refname> <refpurpose>Read entire gz-file into an array</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>gzfile</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam> </methodsynopsis> <para> Identical to <function>readgzfile</function>, except that <function>gzfile</function> returns the file in an array. </para> <para> You can use the optional second parameter and set it to "1", if you want to search for the file in the <link linkend="ini.include-path">include_path</link>, too. </para> <para> See also <function>readgzfile</function>, and <function>gzopen</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzgetc.xml +++ phpdoc-ro/reference/zlib/functions/gzgetc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzgetc"> <refnamediv> <refname>gzgetc</refname> <refpurpose>Get character from gz-file pointer</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzgetc</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> </methodsynopsis> <para> Returns a string containing a single (uncompressed) character read from the file pointed to by zp. Returns &false; on EOF (as does <function>gzeof</function>). </para> <para> The gz-file pointer must be valid, and must point to a file successfully opened by <function>gzopen</function>. </para> <para> See also <function>gzopen</function>, and <function>gzgets</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzgets.xml +++ phpdoc-ro/reference/zlib/functions/gzgets.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzgets"> <refnamediv> <refname>gzgets</refname> <refpurpose>Get line from file pointer</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzgets</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> Returns a (uncompressed) string of up to length - 1 bytes read from the file pointed to by fp. Reading ends when length - 1 bytes have been read, on a newline, or on EOF (whichever comes first). </para> <para> If an error occurs, returns &false;. </para> <para> The file pointer must be valid, and must point to a file successfully opened by <function>gzopen</function>. </para> <para> See also <function>gzopen</function>, <function>gzgetc</function>, and <function>fgets</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzgetss.xml +++ phpdoc-ro/reference/zlib/functions/gzgetss.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzgetss"> <refnamediv> <refname>gzgetss</refname> <refpurpose> Get line from gz-file pointer and strip HTML tags </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzgetss</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>allowable_tags</parameter></methodparam> </methodsynopsis> <para> Identical to <function>gzgets</function>, except that <function>gzgetss</function> attempts to strip any HTML and PHP tags from the text it reads. </para> <para> You can use the optional third parameter to specify tags which should not be stripped. <note> <para> <parameter>Allowable_tags</parameter> was added in PHP 3.0.13, PHP4B3. </para> </note> </para> <para> See also <function>gzgets</function>, <function>gzopen</function>, and <function>strip_tags</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzinflate.xml +++ phpdoc-ro/reference/zlib/functions/gzinflate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.11 --> <refentry id="function.gzinflate"> <refnamediv> <refname>gzinflate</refname> <refpurpose>Inflate a deflated string</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzinflate</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> This function takes <parameter>data</parameter> compressed by <function>gzdeflate</function> and returns the original uncompressed data or &false; on error. The function will return an error if the uncompressed data is more than 256 times the length of the compressed input <parameter>data</parameter> or more than the optional parameter <parameter>length</parameter>. </para> <para> See also <function>gzcompress</function>. <function>gzuncompress</function>, <function>gzdeflate</function>, <function>gzencode</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzopen.xml +++ phpdoc-ro/reference/zlib/functions/gzopen.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzopen"> <refnamediv> <refname>gzopen</refname> <refpurpose>Open gz-file</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</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></methodparam> </methodsynopsis> <para> Opens a gzip (.gz) file for reading or writing. The mode parameter is as in <function>fopen</function> ("rb" or "wb") but can also include a compression level ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman only compression as in "wb1h". (See the description of deflateInit2 in zlib.h for more information about the strategy parameter.) </para> <para> <function>gzopen</function> can be used to read a file which is not in gzip format; in this case <function>gzread</function> will directly read from the file without decompression. </para> <para> <function>gzopen</function> returns a file pointer to the file opened, after that, everything you read from this file descriptor will be transparently decompressed and what you write gets compressed. </para> <para> If the open fails, the function returns &false;. </para> <para> You can use the optional third parameter and set it to "1", if you want to search for the file in the <link linkend="ini.include-path">include_path</link>, too. </para> <para> <example> <title><function>gzopen</function> Example</title> <programlisting role="php"> <![CDATA[ $fp = gzopen ("/tmp/file.gz", "r"); ]]> </programlisting> </example> </para> <para> See also <function>gzclose</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzpassthru.xml +++ phpdoc-ro/reference/zlib/functions/gzpassthru.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzpassthru"> <refnamediv> <refname>gzpassthru</refname> <refpurpose> Output all remaining data on a gz-file pointer </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gzpassthru</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> </methodsynopsis> <para> Reads to EOF on the given gz-file pointer and writes the (uncompressed) results to standard output. </para> <para> If an error occurs, returns &false;. </para> <para> The file pointer must be valid, and must point to a file successfully opened by <function>gzopen</function>. </para> <para> The gz-file is closed when <function>gzpassthru</function> is done reading it (leaving <parameter>zp</parameter> useless). </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzputs.xml +++ phpdoc-ro/reference/zlib/functions/gzputs.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzputs"> <refnamediv> <refname>gzputs</refname> <refpurpose>Write to a gz-file pointer</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gzputs</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> <methodparam><type>string</type><parameter>str</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> <function>gzputs</function> is an alias to <function>gzwrite</function>, and is identical in every way. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzread.xml +++ phpdoc-ro/reference/zlib/functions/gzread.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzread"> <refnamediv> <refname>gzread</refname> <refpurpose>Binary-safe gz-file read</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzread</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <simpara> <function>gzread</function> reads up to <parameter>length</parameter> bytes from the gz-file pointer referenced by <parameter>zp</parameter>. Reading stops when <parameter>length</parameter> (uncompressed) bytes have been read or EOF is reached, whichever comes first. </simpara> <para> <informalexample> <programlisting role="php"> <![CDATA[ // get contents of a gz-file into a string $filename = "/usr/local/something.txt.gz"; $zd = gzopen ($filename, "r"); $contents = gzread ($zd, 10000); gzclose ($zd); ]]> </programlisting> </informalexample> </para> <simpara> See also <function>gzwrite</function>, <function>gzopen</function>, <function>gzgets</function>, <function>gzgetss</function>, <function>gzfile</function>, and <function>gzpassthru</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzrewind.xml +++ phpdoc-ro/reference/zlib/functions/gzrewind.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzrewind"> <refnamediv> <refname>gzrewind</refname> <refpurpose>Rewind the position of a gz-file pointer</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gzrewind</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> </methodsynopsis> <para> Sets the file position indicator for zp to the beginning of the file stream. </para> <para> If an error occurs, returns 0. </para> <para> The file pointer must be valid, and must point to a file successfully opened by <function>gzopen</function>. </para> <para> See also <function>gzseek</function> and <function>gztell</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzseek.xml +++ phpdoc-ro/reference/zlib/functions/gzseek.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzseek"> <refnamediv> <refname>gzseek</refname> <refpurpose>Seek on a gz-file pointer</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gzseek</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> <methodparam><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> <para> Sets the file position indicator for the file referenced by zp to offset bytes into the file stream. Equivalent to calling (in C) <literal>gzseek( zp, offset, SEEK_SET )</literal>. </para> <para> If the file is opened for reading, this function is emulated but can be extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position. </para> <para> Upon success, returns 0; otherwise, returns -1. Note that seeking past EOF is not considered an error. </para> <para> See also <function>gztell</function> and <function>gzrewind</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gztell.xml +++ phpdoc-ro/reference/zlib/functions/gztell.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gztell"> <refnamediv> <refname>gztell</refname> <refpurpose>Tell gz-file pointer read/write position</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gztell</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> </methodsynopsis> <para> Returns the position of the file pointer referenced by <parameter>zp</parameter>; i.e., its offset into the file stream. </para> <para> If an error occurs, returns &false;. </para> <para> The file pointer must be valid, and must point to a file successfully opened by <function>gzopen</function>. </para> <para> See also <function>gzopen</function>, <function>gzseek</function> and <function>gzrewind</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzuncompress.xml +++ phpdoc-ro/reference/zlib/functions/gzuncompress.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.11 --> <refentry id="function.gzuncompress"> <refnamediv> <refname>gzuncompress</refname> <refpurpose>Uncompress a deflated string</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>gzuncompress</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> This function takes <parameter>data</parameter> compressed by <function>gzcompress</function> and returns the original uncompressed data or &false; on error. The function will return an error if the uncompressed data is more than 256 times the length of the compressed input <parameter>data</parameter> or more than the optional parameter <parameter>length</parameter>. </para> <para> See also <function>gzdeflate</function>, <function>gzinflate</function>, <function>gzcompress</function>, <function>gzencode</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/gzwrite.xml +++ phpdoc-ro/reference/zlib/functions/gzwrite.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.gzwrite"> <refnamediv> <refname>gzwrite</refname> <refpurpose>Binary-safe gz-file write</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>gzwrite</methodname> <methodparam><type>resource</type><parameter>zp</parameter></methodparam> <methodparam><type>string</type><parameter>string</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <simpara> <function>gzwrite</function> writes the contents of <parameter>string</parameter> to the gz-file stream pointed to by <parameter>zp</parameter>. If the <parameter>length</parameter> argument is given, writing will stop after <parameter>length</parameter> (uncompressed) bytes have been written or the end of <parameter>string</parameter> is reached, whichever comes first. </simpara> <simpara> <function>gzwrite</function> returns the number of (uncompressed) bytes written to the gz-file stream pointed to by <parameter>zp</parameter>. </simpara> <simpara> Note that if the <parameter>length</parameter> argument is given, then the <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link> configuration option will be ignored and no slashes will be stripped from <parameter>string</parameter>. </simpara> <simpara> See also <function>gzread</function>, <function>gzopen</function>, and <function>gzputs</function>. </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:"../../../../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 --> Index: phpdoc-ro/reference/zlib/functions/readgzfile.xml +++ phpdoc-ro/reference/zlib/functions/readgzfile.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 --> <refentry id="function.readgzfile"> <refnamediv> <refname>readgzfile</refname> <refpurpose>Output a gz-file</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>readgzfile</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam> </methodsynopsis> <para> Reads a file, decompresses it and writes it to standard output. </para> <para> <function>readgzfile</function> can be used to read a file which is not in gzip format; in this case <function>readgzfile</function> will directly read from the file without decompression. </para> <para> Returns the number of (uncompressed) bytes read from the file. If an error occurs, &false; is returned and unless the function was called as <literal>@readgzfile</literal>, an error message is printed. </para> <para> The file <parameter>filename</parameter> will be opened from the filesystem and its contents written to standard output. </para> <para> You can use the optional second parameter and set it to "1", if you want to search for the file in the <link linkend="ini.include-path">include_path</link>, too. </para> <para> See also <function>gzpassthru</function>, <function>gzfile</function>, and <function>gzopen</function>. </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:"../../../../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 -->
« previous php.doc.ro (#8) next »