Msg#: 4266856 posted 2:43 am on Feb 15, 2011 (gmt 0)
I decided to generate the file name using the php random number generator because the tempnam() function kept giving me the windows server system temp folder "C:\windows\temp\" as a directory even though I set the dir string in tempnam() to "/tmp" so the file would be created in the /tmp folder under the site root.
I have a feeling that the tempnam() dir parameter does not like relative paths.
I even tried using the full URL path "www.domain.com/tmp" as a dir in the tempnam() function but it still would not work.
Msg#: 4266856 posted 6:42 am on Feb 15, 2011 (gmt 0)
My development server is a windows 7 x64 machine.
I tried your suggestions, but i still get "C:\Windows\Temp\". According to the php doc's, if the specified directory does not exist, tempnam() may generate a file in the system's temporary directory, and return the name of that.
the "/tmp" folder i'm trying to write a tmp file into exists in the development sites root directory "client". The complete system path on the development web server is "D:\Webserver\Apache\development\client\tmp". Maybe i'm just not specifying the tempnam dir parameter right.
I guess i could try and just use tempnam() with some string functions to extract the unique id and then append the file prefix and type to it.