RE: [PHP-WIN] upload_tmp_dir = c:\php\uploads
| From: | Asendorf, John | Date: | Tue, 25 Jul 2000 16:18:58 +0000 |
| Subject: | RE: [PHP-WIN] upload_tmp_dir = c:\php\uploads | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1307@lists.php.net to get a copy of this message | ||
I think you need to use stripslashes()
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer - http://www.lcounty.com
Licking County, Ohio, USA
740-349-3631
> -----Original Message-----
> From: Dave Johnston [SMTP:davjoh@interlog.com]
> Sent: Tuesday, July 25, 2000 11:46 AM
> 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