是否可以更改函数sys_get_temp_dir()返回的值?
我的问题是,我没有对该目录(/tmp)的写入权限,也无法更改。
感谢
您可以使用环境变量:
<?php
putenv('TMPDIR=/foo/bar');
echo sys_get_temp_dir(); // Outputs: /foo/bar