Re: Files uploaded through a form
| From: | Chris | Date: | Mon, 09 Oct 2006 05:40:14 +0000 |
| Subject: | Re: Files uploaded through a form | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42514@lists.php.net to get a copy of this message | ||
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/