Re: [PHP-DB] Files uploaded through a form

2006-10-08 Thread Chris

Ron Piggott (PHP) wrote:

The way my web hosting server was configured is that files uploaded
through a web form to be processed by PHP are owned by 'www'.  I am
wondering if I am able to change the owner of the file to my ftp user
name before I use the move_uploaded_file command to the directory I need
the file to move to.  


No. Only the 'root' user on the server can change file ownership.


I am also wondering what the IF syntax is to see if the file upload was
successful.  Somehow I would like to know if 


move_uploaded_file( $userfile , $destination_file_name);


RTFM:
http://php.net/move_uploaded_file

If filename is not a valid upload file, then no action will occur, and 
move_uploaded_file() will return FALSE.


If filename is a valid upload file, but cannot be moved for some reason, 
no action will occur, and move_uploaded_file() will return FALSE. 
Additionally, a warning will be issued.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Files uploaded through a form

2006-10-07 Thread Ron Piggott (PHP)
The way my web hosting server was configured is that files uploaded
through a web form to be processed by PHP are owned by 'www'.  I am
wondering if I am able to change the owner of the file to my ftp user
name before I use the move_uploaded_file command to the directory I need
the file to move to.  

I am also wondering what the IF syntax is to see if the file upload was
successful.  Somehow I would like to know if 

move_uploaded_file( $userfile , $destination_file_name);

worked successfully before I update my table.

Ron