Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine the system TEMP folder 1

Status
Not open for further replies.

manitoba

Programmer
Jan 29, 2004
79
0
0
CA
Hi,

Does anyone know how to get the temp folder path from PHP? I am looking for a function that will return something like "/tmp" or "C:\WINDOWS\Temp".

Thanks.
 
Look at what phpinfo() yields for upload_tmp_dir:
Code:
<?
phpinfo();
?>
 
Thanks. I am going to use this:
Code:
getenv("TEMP");
.
 
Cool... be warned that's the OS's temporary directory, not PHP's. It's very possible they're the same, it's also very possible they're different.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top