请详细描述问题
php8.1.2
windows下用的phpenv环境进行的安装。
1,安装任意版本,然后JS就会报错
可以查看下上传接口返回的数据是什么,查看下网络请求结果。
以下是返回的数据
<br />
<b>Notice</b>: Unknown: file created in the system's temporary directory in <b>Unknown</b> on line <b>0</b><br />
{"code":0,"msg":"ok","data":{"chunks":1,"chunk":0,"file":{},"finished":true,"data":{"category":"image","path":"pogbu4xnqfejotabqt5aythv3hpepalc.jpg","filename":"553725a3f611e39a53aed89507210c98.jpg","size":"28564","md5":"1dcb20317e1089432fe110c4e90c2603","updated_at":"2023-03-08T09:32:56.000000Z","created_at":"2023-03-08T09:32:56.000000Z","id":17},"path":"data_temp\/image\/pogbu4xnqfejotabqt5aythv3hpepalc.jpg","preview":"\/data_temp\/image\/pogbu4xnqfejotabqt5aythv3hpepalc.jpg"}}
以下是请求的
{"code":0,"msg":"ok","data":{"lastModifiedDate":"Wed Aug 24 2022 16:04:55 GMT+0800 (\u4e2d\u56fd\u6807\u51c6\u65f6\u95f4)","md5":"1dcb20317e1089432fe110c4e90c2603","name":"553725a3f611e39a53aed89507210c98.jpg","size":"28564","type":"image\/jpeg","userId":1,"chunkUploaded":0,"hash":"b71e0bf173d0297c3fbc613938939819","path":"pogbu4xnqfejotabqt5aythv3hpepalc.jpg","fullPath":"data_temp\/image\/pogbu4xnqfejotabqt5aythv3hpepalc.jpg"}}
看应该是临时文件配置问题,检查下 php.ini 的变量 upload_tmp_dir
我发现这个问题了,谢谢。
QQ扫一扫联系
点击联系
2374926113
微信扫一扫联系
可以查看下上传接口返回的数据是什么,查看下网络请求结果。
以下是返回的数据
<br />
<b>Notice</b>: Unknown: file created in the system's temporary directory in <b>Unknown</b> on line <b>0</b><br />
{"code":0,"msg":"ok","data":{"chunks":1,"chunk":0,"file":{},"finished":true,"data":{"category":"image","path":"pogbu4xnqfejotabqt5aythv3hpepalc.jpg","filename":"553725a3f611e39a53aed89507210c98.jpg","size":"28564","md5":"1dcb20317e1089432fe110c4e90c2603","updated_at":"2023-03-08T09:32:56.000000Z","created_at":"2023-03-08T09:32:56.000000Z","id":17},"path":"data_temp\/image\/pogbu4xnqfejotabqt5aythv3hpepalc.jpg","preview":"\/data_temp\/image\/pogbu4xnqfejotabqt5aythv3hpepalc.jpg"}}
以下是请求的
{"code":0,"msg":"ok","data":{"lastModifiedDate":"Wed Aug 24 2022 16:04:55 GMT+0800 (\u4e2d\u56fd\u6807\u51c6\u65f6\u95f4)","md5":"1dcb20317e1089432fe110c4e90c2603","name":"553725a3f611e39a53aed89507210c98.jpg","size":"28564","type":"image\/jpeg","userId":1,"chunkUploaded":0,"hash":"b71e0bf173d0297c3fbc613938939819","path":"pogbu4xnqfejotabqt5aythv3hpepalc.jpg","fullPath":"data_temp\/image\/pogbu4xnqfejotabqt5aythv3hpepalc.jpg"}}
看应该是临时文件配置问题,检查下 php.ini 的变量 upload_tmp_dir
我发现这个问题了,谢谢。