phpbar.de logo

Mailinglisten-Archive

[php] Re[2]: [php] Klasse gibt keinen Wert =?iso-8859-1?q?zur=FCc?=

[php] Re[2]: [php] Klasse gibt keinen Wert zurüc

Jens Steinborn php_(at)_phpcenter.de
Sun, 11 Nov 2001 13:42:16 +0100


Hi

 Class Upload
 {       
         var $HTTP_POST_FILES;

         function Upload(&$HTTP_POST_FILES)
         {
                 $this->HTTP_POST_FILES =& $HTTP_POST_FILES;
                 $this->isPosted = false;
         }
         
         function getFileName($field)
         {
                 return $this->HTTP_POST_FILES[$field]['name'];
         }
         
 }


if ($status)
{
        $upload = new Upload($HTTP_POST_FILES);
        echo $upload->getFileName("file");
} 

Vielleicht mal so? oder vielleicht:

 Class Upload
 {       
         var $HTTP_POST_FILES;

         function Upload()
         {
	     global $HTTP_POST_FILES;
                 $this->HTTP_POST_FILES =& $HTTP_POST_FILES;
                 $this->isPosted = false;
         }
         
         function getFileName($field)
         {
                 return $this->HTTP_POST_FILES[$field]['name'];
         }
         
 }

if ($status)
{
        $upload = new Upload();
        echo $upload->getFileName("file");
} 


oder:

 Class Upload
 {       
         
         function getFileName($field)
         {
	     global $HTTP_POST_FILES;
                 return $HTTP_POST_FILES[$field]['name'];
         }
         
 }

if ($status)
{
        echo Upload::getFileName("file");
} 



Jens 

-- 
-\*SPDJ*/-


php::bar PHP Wiki   -   Listenarchive