Aug 6, 2004 #1 manitoba Programmer Joined Jan 29, 2004 Messages 79 Location 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.
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.
Aug 6, 2004 #2 DRJ478 IS-IT--Management Joined Aug 10, 2001 Messages 2,264 Location US Look at what phpinfo() yields for upload_tmp_dir: Code: <? phpinfo(); ?> Upvote 0 Downvote
Aug 6, 2004 1 #3 skiflyer Programmer Joined Sep 24, 2002 Messages 2,213 Location US If you need it on the fly, figure out the variable name using phpinfo() and then use http://www.php.net/manual/en/function.ini-get.php ini_get(); to retrieve the value Upvote 0 Downvote
If you need it on the fly, figure out the variable name using phpinfo() and then use http://www.php.net/manual/en/function.ini-get.php ini_get(); to retrieve the value
Aug 7, 2004 Thread starter #4 manitoba Programmer Joined Jan 29, 2004 Messages 79 Location CA Thanks. I am going to use this: Code: getenv("TEMP"); . Upvote 0 Downvote
Aug 7, 2004 #5 skiflyer Programmer Joined Sep 24, 2002 Messages 2,213 Location US 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. Upvote 0 Downvote
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.