cvs: peardoc /en/core pear.xml

From: Date: Fri, 22 Nov 2002 08:50:37 +0000
Subject: cvs: peardoc /en/core pear.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-33@lists.php.net to get a copy of this message
philip Fri Nov 22 03:50:37 2002 EDT Modified files: /peardoc/en/core pear.xml Log: Removing parse error as empty() only takes on vars. Adding <?php ?>. Index: peardoc/en/core/pear.xml diff -u peardoc/en/core/pear.xml:1.7 peardoc/en/core/pear.xml:1.8 --- peardoc/en/core/pear.xml:1.7 Sat Aug 17 05:57:29 2002 +++ peardoc/en/core/pear.xml Fri Nov 22 03:50:36 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <reference id="reference"> <title>PEAR base and error handling class</title> @@ -115,6 +115,8 @@ <example id="example.destructors"> <title>PEAR: emulated destructors</title> <programlisting role="php"> +<?php + require_once "PEAR.php"; class FileContainer extends PEAR @@ -131,9 +133,9 @@ if (!is_resource($fp)) { return; } - while (!empty($data = fread($fp, 2048))) { - $this->contents .= $data; - } + + $this->contents = fread($fp, filesize($file)); + fclose($fp); } @@ -164,6 +166,7 @@ // When the request is done and PHP shuts down, $fileobj's // "destructor" is called and updates the file on disk. +?> </programlisting> </example> <note>

« previous php.pear.doc (#33) next »