You are here: Re: comp.lang.php « PHP Programming Language « IT news, forums, messages
Re: comp.lang.php

Posted by on 10/28/07 15:35

On Oct 25, 11:03 pm, admyc <ad...@hotmail.com> wrote:
> Hello
>
> I am having trouble making PHP web page that uploads an image file and
> moves it to a new file name. The problem occurs when the new filename
> already exists.
>
> I am using move_uploaded_file().
>
> The fist time an image file is uploaded and moved to a new file name
> there is no problem, however if I decide to upload a different image
> file, when the script tries to move this to the same filename (which
> is what I want as I want the uploaded file to have a specific name) it
> doesn't work and a couple of warning messages are shown one saying
> 'failed to open stream: No such file or directory in...' and the other
> saying 'Unable to move '...\tmp\php42.tmp' to 'htdocs/.../images/
> newimagename.jpg' ...'
>
> I have looked atwww.w3schools.com and it says 'Note: If the
> destination file already exists, it will be overwritten.' however I
> think the problem is that this is not happening?
>
> Any help very much appreciated
>
> Thanks
>
> AM


if you upload a file . you can change the file to anther name . for
example , you can give the file a new name like
<?=mktime()?>.jpg or <?=mtkime()?>.bmp .

 

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

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