|
Posted by Dave Mennenoh on 02/13/06 18:34
Can anyone explain to me what I'm doing wrong here?
These three lines are my upload script. As it's shown here it works - except
that I'm not using the $folder variable, which I need. I just have the
folder hardcoded within the line that assigns $moveTo.
$folder = $_POST['folder'];
$moveTo = "portfolio/bay_website/".$_FILES['Filedata']['name'];
move_uploaded_file($_FILES['Filedata']['tmp_name'], $moveTo);
If I now break out "portfolio/bay_website/" to a variable, and use that it
stops working:
$folder = $_POST['folder'];
$d = "portfolio/bay_website/";
$moveTo = $d.$_FILES['Filedata']['name'];
move_uploaded_file($_FILES['Filedata']['tmp_name'], $moveTo);
How is this different from the first one? I cannot figure this out, and it's
why using my $folder variable is not working... Ultimately I simply want
this:
$folder = $_POST['folder'];
move_uploaded_file($_FILES['Filedata']['tmp_name'],
$folder.$_FILES['Filedata']['name']);
--
Dave -
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/
[Back to original message]
|