|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-28 15:24 UTC] aidan@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 02:00:02 2025 UTC |
Description: ------------ When i use the tempnam() function a file is succefully created but it seems that the file is not writeable. I am running php 4.3.9 on IIS 5 as CGI on windows 2000. Reproduce code: --------------- <? // create a tempfile for the thumbnail $tempThumbnailFile = tempnam ("tmp", "thumb"); // write the contents of the zip entry to the tempfile $handle = fopen($tempThumbnailFile, 'a+'); fwrite($handle, $docData); fclose($handle); /* DO SOME PROCESSING ON THE FILE */ // Read the contents of the files into a string. $thumbnailData = fread(fopen($tempThumbnailFile, "r+"), filesize($tempThumbnailFile)); ?> Expected result: ---------------- I expect the a tempfile to be created and I expect to be able to acces this file for write acces in order to manipulate the file contents. Actual result: -------------- Warning: filesize(): Stat failed for C:\Windows\TEMP\thu8450.tmp (errno=2 - No such file or directory) and so on.................. The file is created i can find it in explorer.