|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-14 06:10 UTC] stas@php.net
[2000-11-29 07:45 UTC] shensche at defcom dot de
[2001-06-03 01:09 UTC] sniper@php.net
[2001-06-05 12:49 UTC] shensche at defcom dot de
[2001-10-20 21:00 UTC] sniper@php.net
[2001-10-22 07:38 UTC] shensche at defcom dot de
[2001-10-22 14:24 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 18:00:01 2025 UTC |
when filtering the double slashes from "tmp_name" from an $HTTP_POST_FILE, it cannot be moved to the proper location anymore. this is similar to the problem addressed by bugreport #5375 with windowsNT. config: php version 4.03pl1 in safe-mode with mysql and gd on a suse linux 6.4 well, but i know it is not so much of a problem: just do not tamper with the "tmp_name" and everything is alright. does anyone know a reason for really doing that? cheers, sebastian ------------ example code ------------------------- <?php if ($HTTP_POST_VARS["update"] == 1) { $src = $HTTP_POST_FILES["upload_file"]["tmp_name"]; /* * BUG here: double slashes are stripped and php cannot * move the uploaded file anymore. */ $src = ereg_replace ("//", "/", $src); move_uploaded_file ($src, "pic.jpg"); } ?> <html> <body> <form action="<?php echo $PHP_SELF ?>" method="POST" enctype="multipart/form-data"> <input type="hidden" name="update" value="1"> hochladen: <input type="file" name="upload_file"><br> <img src="pic.jpg"><br> <input type="submit"> </form> </body> </html>