|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-02 15:43 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
Description: ------------ When I call the tempnam() function, it always returns a file located in the system temp directory (C:\WINNT\TEMP) even if I specify an existing directory. Reproduce code: --------------- class TxtFile { var $_tmp_dir = '/web/tmp/'; function gentmp() { $tmp = ''; if( is_dir( $this->_tmp_dir ) ) $tmp = tempnam( $this->_tmp_dir, get_class($this) ); // $tmp is always located in 'C:\WINNT\TEMP\' even // if specified directory exists... return $tmp; } } $txt = new TxtFile(); echo $txt->gentmp(); Expected result: ---------------- /web/tmp/txt9375.tmp Actual result: -------------- C:\WINNT\TEMP\txt9375.tmp