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

文件上传报错:Unknown: file created in the system's temporary directory

程序员文章站 2022-05-27 08:21:10
nginx+php下文件上传成功,但会有错误提示如下: Notice: Unknown: file created in the system's temporary directory in Unknown on line 0
网上搜索相关资料 ......

nginx+php下文件上传成功,但会有错误提示如下:

<b>notice</b>:  unknown: file created in the system's temporary directory in <b>unknown</b> on line <b>0</b><br />

网上搜索相关资料发现可能和php下临时文件存放目录配置有关,查看进入php.ini配置文件

文件上传报错:Unknown: file created in the system's temporary directory

 

配置文件搜索upload_tmp_dir,默认/var/temp,mac pro下该目录不存在。而我上传的目录是/users/xxx/www/data目录,改成/users/xxx/www/data目录重启php-fpm后,错误提示好了。

文件上传报错:Unknown: file created in the system's temporary directory