Re: File Upload Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2004-10-20 at 17:00 -0700, Robby Russell wrote:
> On Wed, 2004-10-20 at 19:27 -0400, Nathan Mealey wrote:
> > This file upload problem has me very confused.
> > 
> > The code is:
> > 
> > $upload_dir = '/articles_store/';
> > $uploadfile = $upload_dir . basename($_FILES['userfile']['name']);
> > 
> > if (move_uploaded_file($_FILES['userfile']['tmp_name'],$uploadfile)) {
> > } else { die ("Cannot upload file");
> > }
> > 
> > (this code is practically verbatim the example from php.net)
> > 
> > The directory '/articles_store' has permissions 777.  And the user is  
> > and group are 'www' (the Apache user).
> 
> Are you sure that this is the correct path? Did you create a new path in
> your root level as /articles_store ?
> 
> so, if I go on your machine and type in:
> $ cd /
> $ ls 
> 
> it'll show
> /articles_store
> /dev
> /etc
> /var
> 

Basically, my first guess is that you are not understanding the
directory structures properly. You need to give it the full path if
you're going to have a / at the beginning of your directory path.

/foo != yousite.com/foo in the system level.

hth,

Robby


-- 
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | robby@xxxxxxxxxxxxxxx
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux