开发者

PHP - uploading to dir outside docroot

开发者 https://www.devze.com 2023-04-02 01:47 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消