Reply to Re: WTF?

Your name:

Reply:


Posted by Jerry Stuckle on 02/13/06 21:54

Dave Mennenoh wrote:
> 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,

Well, to start with, I don't see where you're using $folder anywhere
once you've gotten it from $_POST['folder']. Maybe you want instead

$moveTo = $folder.$_FILES['Filedata']['name'];

If this doesn't work, what do you get? And what's in $folder?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[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

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