欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

php上传文件问题

程序员文章站 2022-07-09 17:14:10
...
nginx 500问题&error 7问题解决

https://www.lvtao.net/server/498.html
http://bbs.metinfo.cn/question/133

nginx配置
      client_max_body_size 35m;        #客户端上传文件大小设为35M
      client_body_temp_path /mnt/data0/tmp; 

server
  {
    listen       80;
    server_name  xx.com;
    index index.html index.htm index.php;
    root  /mnt/data0/wwwroot/www.xx.com/public_appWeb;
    location ~ .*\.(php|php5)?$
    {
      #fastcgi_pass  unix:/tmp/php-cgi.sock;
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      include fcgi.conf;

      client_max_body_size 35m;        #客户端上传文件大小设为35M
      client_body_temp_path /mnt/data0/tmp;  
    }

    location / {
          if (!-e $request_filename){
             rewrite ^/(.*) /index.php last;
          }
    }

#log_format  wwwlogs-leworldtrip-admin  '$remote_addr - $remote_user [$time_local] "$request" '
#              '$status $body_bytes_sent "$http_referer" '
#               '"$http_user_agent" $http_x_forwarded_for';
    #access_log  /mnt/data1/logs/wwwlogs-xx.log  wwwlogs;
  }


php.ini配置
upload_tmp_dir = /data/wwwroot/tmp