Re: [PHP-DB] File Upload Problems From: kenji chan (kenjikenji <email protected>)
Date: 11/18/00

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 <email protected>> ?????
news:E1F0152638DBD311AEF700D0B74455E212D21E <email protected>
>
> 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 <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>