Reply to Re: <input type="file"> change where file gets uploaded?

Your name:

Reply:


Posted by jojo on 10/18/06 15:12

Mark wrote:
>>> So, from my understanding, when you use <input type="file"> your file
>>> gets uploaded to some temporary folder...
>>>
>>> But is there a way to change where it gets uploaded?
>>>
>>> On my web server, all sites share the same temp folder..so I want to it
>>> to upload somewhere on *my* site.
>
> However, apparently it can be set in php.ini (since I am using php
> anyways...)

If you have acces to it. But this isn't always the case. Some webhosters
do not givew you acces to it because of security reasons. They perhaps
block some PHP-functions which they consider to be a security problem
and do not want them to get activated again (Just one example, there are
a lot more).
But a way that would always work is to copy the temporary file into your
directory:

copy ($_FILES['NAME_OF_YOUR_INPUT']['tmp_name'],
"PATH_TO_YOUR_DIRECTORY".$_FILES['NAME_OF_YOUR_INPUT']['name']);

HTH, jojo

[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

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