When you handle an HTTP upload, the file is uploaded to $_FILES['field_name']['tmp_name'], I know I could extract the temp path from there.
But I was expecting maybe a $_SERVER[] param that had the temp path (there's none) or other elegant way of knowing it.
Is there any?
views:
190answers:
2Available since PHP 5.2.1.
Gumbo
2009-10-05 16:09:52
Returns C:\Windows\TEMP\. My snippet returns D:/WAMP/tmp.
Sbm007
2009-10-05 16:10:27
WAMP is preconfigured to use the tmp dir of the distribution.
Ionuț G. Stan
2009-10-05 16:12:59
This is probably the more correct answer, as the upload temp dir may be different from the system temp dir.
notJim
2009-10-05 16:20:59