Reply to Re: tricky php, can anyone help

Your name:

Reply:


Posted by Marlin Forbes on 09/30/94 12:00

Hi there,

matpac4@gmail.com wrote:
> But I need a way of getting the unique id to the file name and am not
> sure of a way to do this, especially with the problem of when several
> people are completing the form at the same time. I need to make sure
> that the number given to the duplicated .php file isn't associated
> more than once.

When handling uploaded files in PHP, the $_FILES array holds a variable:

$_FILES['userfile']['tmp_name']

The tmp_name is guaranteed to be unique within the folder where the
temporary uploaded files are stored. You could strip the filename
portion of that out and use it in your destination folder.

For more details on file uploads and the temp folder handling, see the
entry under Features/Handling file uploads in the manual.

Or alternately, you can use the php function tempname, detailed under
Filesystem Functions in the manual.

Regards,
Marlin Forbes
Data Shaman
datashaman.com

[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

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