Change default temp directory for PHP file uploads
I'm making a website locally that allows the upload of .pdf files, when these are uploaded locally they go to C:xampptmp
but when I host the site on my University server I don't have access to the temporary directory, is there any way I can change the default temporary location for the file?
Thanks in advance, Dave.
上传文件所在的位置可以使用upload_tmp_dir配置选项进行配置。
Try this.
putenv('TMPDIR=/path/to/dir');
than you can check your tmp directory
sys_get_temp_dir()
I do not believe that you had no right of access to the temp
directory. In temp
directory are stored session data.
You should check temp direcory using:
sys_get_temp_dir()
链接地址: http://www.djcxy.com/p/12630.html
上一篇: 在python中使用谷歌的protobuf而不安装它
下一篇: 更改PHP文件上传的默认临时目录