Re: Re[2]: [PHP] HTTP_POST_FILES undefined - What happen?

From: Date: Thu, 25 Jul 2002 02:49:47 +0000
Subject: Re: Re[2]: [PHP] HTTP_POST_FILES undefined - What happen?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-109406@lists.php.net to get a copy of this message
Thanks all, This is the correct script : Function verify($file) { GLOBAL $HTTP_POST_FILES ; echo $HTTP_POST_FILES['file']['type'] ; echo $HTTP_POST_FILES['file']['name'] ; echo $HTTP_POST_FILES['file']['size'] ; ... } I forgot to put the GLOBAL in the front of the function. Now, my script work well. Ravelomanana Rija rija@vatu.com BP 1528 Port Vila Vanuatu ----- Original Message ----- From: "Tom Rogers" <trogers@kwikin.com> To: "Tom Rogers" <trogers@kwikin.com> Cc: "Rija" <rija@vatu.com>; "PHP-General" <php-general@lists.php.net> Sent: Thursday, July 25, 2002 12:19 PM Subject: Re[2]: [PHP] HTTP_POST_FILES undefined - What happen? > Hi, > > Thursday, July 25, 2002, 11:15:33 AM, you wrote: > TR> Hi, > > TR> Thursday, July 25, 2002, 10:39:08 AM, you wrote: > R>> Hi all, > > R>> Thought I turned on register_globals on in the php.ini, my server didn't know the HTTP_POST_FILES. > > R>> echo $HTTP_POST_FILES[$file]['type'] ; > > R>> echo $HTTP_POST_FILES[$file]['name'] ; > > R>> echo $HTTP_POST_FILES[$file]['size'] ; > > R>> I've always get these messages: > > R>> PHP Warning: Undefined variable: HTTP_POST_FILES in c:\inetpub\wwwroot\ohabolana\scripts\sary_vaovao.inc on line 4 PHP Warning: Undefined variable: HTTP_POST_FILES in > R>> c:\inetpub\wwwroot\ohabolana\scripts\sary_vaovao.inc on line 5 PHP Warning: Undefined variable: HTTP_POST_FILES in c:\inetpub\wwwroot\ohabolana\scripts\sary_vaovao.inc on line 6 > > R>> Any suggestions ? > > R>> Ravelomanana Rija > R>> rija@vatu.com > R>> BP 1528 Port Vila > R>> Vanuatu > > TR> If they are being used in a function you will need to do: > TR> function whatever(){ > TR> global $HTTP_POST_VARS; > TR> . > TR> . > TR> . > TR> } > > TR> Just a guess :) > > > TR> -- > TR> Best regards, > TR> Tom > > > > sorry that should have been > global $HTTP_POST_FILES; > > -- > Best regards, > Tom > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#109406) next »