PHP - uploading to dir outside docroot
I have nginx+php-fastcgi running on my server and I"m trying to allow a php script in /var/www/contest to upload to a non-public directory located at /var/www/private/uploads.
I've tried changing the include path in php.ini but all I ge开发者_如何学Pythont is "No input file specified." when I try to view the page in /contest that uploads the pics.
your php script will run as some user. give that user write access to /var/www/private/uploads.
At first, check your upload_tmp_dir
in PHP_INI system and set to right path.
Check write permissions for it.
Use move_uploaded_file to store files manually in right place.
精彩评论