Re: File Upload Problems

From: Date: Sat, 18 Nov 2000 08:44:18 +0000
Subject: Re: File Upload Problems
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4534@lists.php.net to get a copy of this message
I think you can change that it work in my computer : Yours : copy($userfile, "E:\\Public\\donkey.txt"); Mine : copy($file, "upload/".$userfile_name); You must create upload directory in the self directory, for example : If the PHP file in /Public/theupload.php You should create /Public/upload/ The upload files would be stored in /Public/upload ""George A. Fitch III"" <george-fitch@orgella.com> ????? news:E1F0152638DBD311AEF700D0B74455E212D21E@EXCHANGE_NH... > > Hi, > > I'm having problems uploading files from forms on Win32 with Apache 1.3.12. > I can upload files with Perl, but not PHP. It seems whatever mechanism > copies the files from Apache to the PHP temp directory isn't working because > when I check the temp directory before, after, during an upload, nothings > going on. Furthermore, when I look at the variable returned from the CGI, > it's the user's filepath, not the server one. > > These are the setting in my php.ini: > > file_uploads = On ; Whether to allow HTTP file uploads > upload_tmp_dir = G:/PHP/TEMP/ ; temporary directory for HTTP > uploaded files (will use system default if not specified) > upload_max_filesize = 2M ; Maximum allowed size for uploaded files > > This is my PHP script: > > <HTML> > <HEAD> > <TITLE>PHP is Da Bomb!!!</TITLE> > </HEAD> > <BODY> > <?PHP > > if (isset($userfile)) { > > print "Variable: $userfile<P>"; > print "File: $userfile_name<P>"; > > copy($userfile, "E:\\Public\\donkey.txt"); > > } > > ?> > <FORM ENCTYPE="mutlipart/form-data" ACTION="<?PHP print > $PHP_SELF?>" > METHOD="POST" > > <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" > VALUE="1024000"> > <INPUT TYPE="file" NAME="userfile"> > <INPUT TYPE="submit" VALUE="Get File"> > </FORM> > </BODY> > </HTML> > > I'd appreciate any help, > > Gaf > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#4534) next »