Reply to Re: Problem uploading image files

Your name:

Reply:


Posted by kenoli on 10/13/06 03:04

I was wondering about this, though I'm not sure why I shouldn't be able
to read from the image data while it's in the temporary directory, as
all I am doing is reading from it and then using the data to create a
new file with different dimensions.

My understanding is that before moving it, the image is on the server
in a termporary directory and I should think that the location derived
from $_FILES['file_name']['name'] should be pointing to that image,
even though it will evaporate when the script is through. If the image
is there for moving it, shouldn't it be there for reading it?

Wouldn't moving it just result in my pointing to the same image data at
a different location?

Is the temp directory being erased before my funciton can read the
image from it?

If I could read the image from its temporary directory, it would
mitigate the need to go back and delete the "moved" file at the end of
the script.

Though it is obvious the script is not working for some reason.

--Kenoli

Johnny wrote:
> "kenoli" <kenoli@igc.org> wrote in message
> news:1160682030.249337.213890@k70g2000cwa.googlegroups.com...
> > I was referred to a great script for creating thumbnails of uploaded
> > images from someone on this list. I have been adapting it so it works
> > for several image formats and so I can use it to upload images to a
> > contacts database.
. . .
>
> looks like you need to move the file from the temp dir to your upload dir
>
> if (!move_uploaded_file($_FILES['image_upload']['tmp_name'],
> $destination_file)) {
> // exit sending an email to admin instead of alerting user...
> echo "<br>error moving image from temp
> file=".$_FILES['upload']['tmp_name'].", to ".$destination_file."<br>";
> }
>
> then process that moved file
>
> hth

[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

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