RE: [PHP-WIN] upload_tmp_dir = c:\php\uploads
| From: | Matt Williams | Date: | Wed, 26 Jul 2000 07:56:22 +0000 |
| Subject: | RE: [PHP-WIN] upload_tmp_dir = c:\php\uploads | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1322@lists.php.net to get a copy of this message | ||
Hi
Try putting . as your upload tmp dir. It will use the php dir but it's the
only way I got it working on a non NT machine.
M@
-----Original Message-----
From: Dave Johnston [mailto:davjoh@interlog.com]
Sent: Tuesday, July 25, 2000 04:46
To: PHPWindowsList
Subject: [PHP-WIN] upload_tmp_dir = c:\php\uploads
upload_tmp_dir = c:\php\uploads
The following error will show that the above setting is being ignored.
**************************************
You submitted this file:
Name: C:\\WINDOWS\\TEMP\\php2
Original Name: Ad.txt
Size: 606
Type: text/plain
Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php2' for reading: Unknown error
in c:\Inetpub\wwwroot/upload.php3 on line 11
Error: failed to copy file...
**************************************
The following 2 files are the generators.
<html>
<!-- upload.htm -->
<form action = "upload.php3" method = "post" enctype =
"multipart/form-data">
submit this file: <input type = "file" name = "userfile" ><br>
<input type = submit><BR>
</form>
</html>
<html>
<!-- upload.php3 -->
You submitted this file:<BR><BR>
Name: <? echo($userfile); ?><BR>
Original Name: <? echo ($userfile_name); ?> <BR>
Size: <? echo($userfile_size); ?><BR>
Type: <? echo($userfile_type); ?><BR>
<?
//Copy the file to C:\upload.txt. Remember to escape backslashes!
if (copy($userfile, "c:\\upload.txt")) {
echo ("File successfully copied!");
}else {
echo ("Error: failed to copy file...");
}
//unlink ($userfile);
?>
</html>
Why does the variable &userfile contain "C:\\WINDOWS\\TEMP\\php2" with
double backslashes?
Why is the setting to store uploaded files in the .ini file being ignored or
over-ridden by the system default?
Help greatly appreciated!
Dave
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net