Reply to $_FILES[$field_name]['tmp_name'] dirname missing trailing slash

Your name:

Reply:


Posted by Tom on 12/05/06 18:49

I've beat my head every way I can think of against this wall. Maybe
someone here just knows the answer.

I'm testing an upload class on my laptop WAMP server. When I run the
test script, everything is fine. When I put together my own form and
test uploading the same file, it fails because the
$_FILES[$field_name]['tmp_name'] value is missing the trailing slash at
the end of the temp dir name, so that the temp name looks like this:

c:/wamp/tmpphp11.tmp

instead of:

c:/wamp/tmp\php11.tmp

as in the packaged demo script.

I know that this value is set in php.ini. But that can't be the
problem as everything works fine in the demo script. As far as I can
discern, this value -- the temp dir name -- is handled internally by
PHP and not affected by the script, so I can't even check the value and
add the slash if it's missing. So my question: does anyone know why
the trailing slash is being dropped in my script?

I've tried every variation I can think of. I even tried to replicate
my error in the demo script by changing some of its form settings. I
can't get the two script to do the same thing with this
$_FILES[$field_name]['tmp_name'] value, even though everything else
should be equal.

All I can figure is that it has something to do with the forms' x/html
settings. The only other significant different between the two scripts
is that mine posts to itself and the demo to a separate page.

Anyway, if you can answer this for me, you'd really make my day! :)

Thanks,
Tom

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация