|
Posted by Christina on 07/13/06 04:19
Hi,
Yes, I already understood the part of it initially being put into a temp
directory, what I don't understand is that every tutorial I see has the
move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path) inside
an if statement. "if
(move_uploaded_file($_FILES['uploadedfile']['tmp_name']$target_path) )"
rather than as a command or call to a function. Therefore it seems to me it
is just check if the file was moved, and if so, you do something within the
if statement. So, do you need to state:
"move_uploaded_file($_FILES['uploadedfile']['tmp_name']$target_path);",
then do the if statement: "if
(move_uploaded_file($_FILES['uploadedfile']['tmp_name']$target_path) )"?
Chris
"Flamer" <die.spam@hotmail.com> wrote in message
news:1152745768.330657.317910@b28g2000cwb.googlegroups.com...
>
> Chris wrote:
>
> > I'm not fully understanding the move_uploaded_file function. PHP.net is
> > either vague about usage (unclear examples) or overly technical in their
> > language (as though whoever is looking for info has already been
programming
> > for 10 years). Hence, I usually just get more confused after reading
their
> > 'explanations'. The point is that in most cases from tutorials, books,
etc.
> > move_uploaded_file is supposed to move the file to a new location from
the
> > temp_dir. Tutorials seem to focus on people only uploading image files
and
> > leaving them in an arbitrary folders where all uploads reside. I need
to
> > move the files from the root temp directory to as many as 3 subfolder
levels
> > (Home/category or Home/group/project/category) depending on the
selections
> > the user makes. However, it is defined as a boolean and it appears only
to
> > be used in an 'if' statement: i.e:
> >
> [snip]
>
> Hi,
>
> when its uploaded its saved to a temp dir with a temp name, thats how
> you need to access it to move it
> move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path
> ect..
>
> Flamer.
>
Navigation:
[Reply to this message]
|