I would like to upload files to my server using php and xmlhttprequest in POST.
But my /tmp dir is too small, so I created a new tmp folder for upload with 777 access, and I changed the vhost conf file to set upload_tmp_dir to this folder's path.
If i display phpinfo, this folder appears as the upload_tmp_dir.
But when I upload a file, nothing appears in the new tmp folder but I can see this type of file in /tmp : 20140321-165951-Uyxh938AAQEAACcDEeEAAAAC-request_body-uW4YRM
What can I do to get php upload to use the tmp folder I created ?
Thanks a lot for your help
要将文件上传到tmp文件夹,您应该使用此文件
file_put_contents(sys_get_temp_dir().'/file.txt', 'content');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.