You are here: Re: [PHP] asking comment « PHP « IT news, forums, messages
Re: [PHP] asking comment

Posted by Richard Lynch on 04/06/05 08:26

On Wed, March 30, 2005 5:44 am, William Stokes said:
> I got a bit frustrated with image upload stuff with different image name
> problems. So I created a system that gives the uploaded imaged a random
> numeric name between 1-10 000 000 and saves the file to a server folder
> and
> the image name to mysql DB.

Given the sort of race conditions and problems brought up here, it occurs
to me that *MAYBE* http://php.net/mkdir would help, as I believe it's
atomic, and will either succeed or fail.

You are then creating a unique directory name for each image, and you put
the image inside that directory.

That may be even more problematic than using the SQL, however...

Still, worth pondering, I think.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this 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

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