程序很多情况会需要写临时文件

大多数会使用如果方式:

tempnam("/tmp","filename");

但是/tmp不一定能写....,可以改成

tempnam(sys_get_temp_dir(),"filename");

相关文章: