Reputation: 373
Is it possible to change the value that the function sys_get_temp_dir() returns?
My problem is that I don't have write permissions to that directory ( /tmp ) and I can't change that.
Thanks
Upvotes: 3
Views: 16418
Reputation: 7485
You can use an environmental variable:
<?php
putenv('TMPDIR=/foo/bar');
echo sys_get_temp_dir(); // Outputs: /foo/bar
Upvotes: 8