Reply to WTF?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на 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

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