|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-06 23:08 UTC] a dot u dot savchuk at gmail dot com
[2008-03-07 00:12 UTC] c dot d dot brengel at att dot net
[2008-11-07 11:35 UTC] vrana@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 19:00:02 2025 UTC |
Description: ------------ It appears that when using "tempnam" the $prefix parameter only accepts 3 characters. I used tempnam(getcwd(),'ADR'.date(Y.m.d).'_') and the resulting file name ended up as "ADRBA.tmp" not the "ADR2008222_BA.tmp" that it should have given. I then tried tempnam(getcwd(), 'ADR123') and stil got only ADRXX.tmp. Not sure but would appreciate it if you could determine if this is in fact correct behavior. Reproduce code: --------------- <?php echo getcwd() . "\n\r"; chdir('tmp'); echo getcwd() . "\n\r"; $file=tempnam(getcwd(),'ADR'.date(Y.m.d).'_'); echo "$file"; ?> Expected result: ---------------- C:\Inetpub\wwwroot\ADRAL C:\Inetpub\wwwroot\ADRAL\tmp C:\WINDOWS\Temp\ADR2008222_C2.tmp Actual result: -------------- C:\Inetpub\wwwroot\ADRAL C:\Inetpub\wwwroot\ADRAL\tmp C:\WINDOWS\Temp\ADRC2.tmp