|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-06-02 15:35 UTC] flip101 at gmail dot com
Description: ------------ Not sure if the "php" prefix is reserved, but if it is, it's not documented at https://secure.php.net/manual/en/function.tempnam.php Note: that i made up the expected results (on line 4), not sure how the random filename algorithm works. Test script: --------------- var_dump( file_exists(sys_get_temp_dir()), is_writable(sys_get_temp_dir()), sys_get_temp_dir(), tempnam(sys_get_temp_dir(), 'php'), tempnam(sys_get_temp_dir(), 'aaa') ); Expected result: ---------------- bool(true) bool(true) string(34) "C:\Users\flip101\AppData\Local\Temp" string(45) "C:\Users\flip101\AppData\Local\Temp\php2EC.tmp" string(45) "C:\Users\flip101\AppData\Local\Temp\aaaF2A.tmp" Actual result: -------------- bool(true) bool(true) string(34) "C:\Users\flip101\AppData\Local\Temp" bool(false) string(45) "C:\Users\flip101\AppData\Local\Temp\aaaF2A.tmp" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 11:00:01 2025 UTC |
> My exact php version is this one: php-5.6.20-Win32-VC11-x64.zip Running your latest test script on this very version: bool(true) bool(true) string(31) "C:\Users\cmb\AppData\Local\Temp" string(43) "C:\Users\cmb\AppData\Local\Temp\phpB8D1.tmp" string(43) "C:\Users\cmb\AppData\Local\Temp\aaaB8E2.tmp" So, I still can't reproduce the issue. Anyhow, note[1]: | The x64 builds of PHP 5 for Windows are experimental, I suggest you try with an x86 build of PHP 5.6.22. [1] <http://windows.php.net/download/>