cvs: pear /HTTP_Upload package.xml /HTTP_Upload/docs upload_example.php

From: Date: Sun, 15 Aug 2004 12:44:15 +0000
Subject: cvs: pear /HTTP_Upload package.xml /HTTP_Upload/docs upload_example.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-22914@lists.php.net to get a copy of this message
wenz Sun Aug 15 08:44:15 2004 EDT Modified files: /pear/HTTP_Upload package.xml /pear/HTTP_Upload/docs upload_example.php Log: whitespace fixes plus one bug in the example http://cvs.php.net/diff.php/pear/HTTP_Upload/package.xml?r1=1.18&r2=1.19&ty=u Index: pear/HTTP_Upload/package.xml diff -u pear/HTTP_Upload/package.xml:1.18 pear/HTTP_Upload/package.xml:1.19 --- pear/HTTP_Upload/package.xml:1.18 Wed Aug 11 02:27:01 2004 +++ pear/HTTP_Upload/package.xml Sun Aug 15 08:44:15 2004 @@ -73,7 +73,7 @@ <dir name="/" baseinstalldir="HTTP"> <file role="php" md5sum="c6ca9a2bf44dc9cac1997f401ea18709">Upload.php</file> <dir name="docs" role="doc"> - <file md5sum="2cb222ea90d1dbb425f170e11b9b6ca8">upload_example.php</file> + <file md5sum="8adf937df3cdfcf1f3f55451692c3533">upload_example.php</file> </dir> </dir> </filelist> http://cvs.php.net/diff.php/pear/HTTP_Upload/docs/upload_example.php?r1=1.4&r2=1.5&ty=u Index: pear/HTTP_Upload/docs/upload_example.php diff -u pear/HTTP_Upload/docs/upload_example.php:1.4 pear/HTTP_Upload/docs/upload_example.php:1.5 --- pear/HTTP_Upload/docs/upload_example.php:1.4 Fri Jul 30 21:11:40 2004 +++ pear/HTTP_Upload/docs/upload_example.php Sun Aug 15 08:44:15 2004 @@ -11,30 +11,30 @@ </body></html> <?php error_reporting(E_ALL); -if (!isset($submit)) { - exit; +if (!isset($_GET["submit"])) { + exit; } require 'HTTP/Upload.php'; echo '<pre>'; -//print_r($HTTP_POST_FILES); + $upload = new http_upload('es'); $file = $upload->getFiles('userfile'); if (PEAR::isError($file)) { - die ($file->getMessage()); + die ($file->getMessage()); } if ($file->isValid()) { - $file->setName('uniq'); - $dest_dir = './uploads/'; - $dest_name = $file->moveTo($dest_dir); - if (PEAR::isError($dest_name)) { - die ($dest_name->getMessage()); - } - $real = $file->getProp('real'); - echo "Uploaded $real as $dest_name in $dest_dir\n"; + $file->setName('uniq'); + $dest_dir = './uploads/'; + $dest_name = $file->moveTo($dest_dir); + if (PEAR::isError($dest_name)) { + die ($dest_name->getMessage()); + } + $real = $file->getProp('real'); + echo "Uploaded $real as $dest_name in $dest_dir\n"; } elseif ($file->isMissing()) { - echo "No file selected\n"; + echo "No file selected\n"; } elseif ($file->isError()) { - echo $file->errorMsg() . "\n"; + echo $file->errorMsg() . "\n"; } print_r($file->getProp()); echo '</pre>';

« previous php.pear.cvs (#22914) next »