note 89607 added to function.move-uploaded-file

From: Date: Mon, 16 Mar 2009 19:14:28 +0000
Subject: note 89607 added to function.move-uploaded-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-152001@lists.php.net to get a copy of this message
One of the commenters said, 'Don't forget to set chmod to 777 for the directory to which you want to move the file. Otherwise you will maybe get "failed to open stream: Permission denied in ..."!' A more secure approach is to chmod the directory to 755 and chown it to the user who will be doing the uploading, e.g. www-data. For example, at the command line you would ls to the directory above the upload directory and type: chown www-data my_upload_directory; chmod 755 my_upload_directory Then press enter. ---- Server IP: 92.48.74.199 Probable Submitter: 131.111.21.21 ---- Manual Page -- http://www.php.net/manual/en/function.move-uploaded-file.php Edit -- https://master.php.net/note/edit/89607 Del: integrated -- https://master.php.net/note/delete/89607/integrated Del: useless -- https://master.php.net/note/delete/89607/useless Del: bad code -- https://master.php.net/note/delete/89607/bad+code Del: spam -- https://master.php.net/note/delete/89607/spam Del: non-english -- https://master.php.net/note/delete/89607/non-english Del: in docs -- https://master.php.net/note/delete/89607/in+docs Del: other reasons-- https://master.php.net/note/delete/89607 Reject -- https://master.php.net/note/reject/89607 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152001) next »