Skip to main content
March 9, 2007
Answered

PHP File Upload

  • March 9, 2007
  • 3 replies
  • 486 views
I have done a really simple php file upload. However, when it uploads it uploads where the upload.php file is at. Is there a way to upload it into a different file folder?

Right now it gets uploaded to "/media/randImages/" becuase in that folder there is the upload.php
When I upload I want the upload.php to direct the image to "/media/randImages/people/"

How is this done?

Thank you.
AdonaiEchad
-----------------------

This topic has been closed for replies.
Correct answer Newsgroup_User
On Fri, 9 Mar 2007 02:31:54 +0000 (UTC), "AdonaiEchad"
<webforumsuser@macromedia.com> wrote:

> $file_dir = "";

Change the above line to:

$file_dir=$_SERVER['DOCUMENT_ROOT']."/media/randImages/people/";

Gary

3 replies

Inspiring
March 9, 2007
On Fri, 9 Mar 2007 20:59:16 +0000 (UTC), "AdonaiEchad"
<webforumsuser@macromedia.com> wrote:

>Thank you, that was what I needed.

You're welcome.

Gary
March 9, 2007
Thank you, that was what I needed.
Newsgroup_UserCorrect answer
Inspiring
March 9, 2007
On Fri, 9 Mar 2007 02:31:54 +0000 (UTC), "AdonaiEchad"
<webforumsuser@macromedia.com> wrote:

> $file_dir = "";

Change the above line to:

$file_dir=$_SERVER['DOCUMENT_ROOT']."/media/randImages/people/";

Gary