note 69220 added to function.tempnam

From: Date: Mon, 28 Aug 2006 00:19:54 +0000
Subject: note 69220 added to function.tempnam
Groups: php.notes 
Request: Send a blank email to php-notes+get-116402@lists.php.net to get a copy of this message
Beware that on Windows NT and other windows, if you have, for example, a variable $work_dir with a path to some dir on your document root(or any other dir). Note the following: <?php $work_dir = 'C:/some/path/to/document_root/dir'; file_exists($working_dir); // Returns true is_writable($working_dir); // Returns true $tempfile = tempnam($working_dir,'img'); //$temfile now contains a system wide temp directory file, like 'C:/WINNT.SBS/img444.tmp' instead of the directory we pass it //Thats because we need to give I_USR (IIS user) user write permission to $working_dir although according to the aforementioned functions seemed it already had it... //If you want to use just the system wide temp directory return by default by tempnam you will also need to give it write permission to I_USR user to be able to write to that file... ?> ---- Server IP: 130.206.1.5 Probable Submitter: 88.11.117.162 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.tempnam.php Edit -- https://master.php.net/note/edit/69220 Del: integrated -- https://master.php.net/note/delete/69220/integrated Del: useless -- https://master.php.net/note/delete/69220/useless Del: bad code -- https://master.php.net/note/delete/69220/bad+code Del: spam -- https://master.php.net/note/delete/69220/spam Del: non-english -- https://master.php.net/note/delete/69220/non-english Del: in docs -- https://master.php.net/note/delete/69220/in+docs Del: other reasons-- https://master.php.net/note/delete/69220 Reject -- https://master.php.net/note/reject/69220 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116402) next »