Page 1 of 1

tempnam()

Posted: Fri Nov 11, 2005 3:39 pm
by Ree
Is it possible to set a relative to the running script path in tempnam()? On my windows machine, if I use a relative path (say, ./temp), it stores the file in [PHP dir/temp], not in [script dir/temp].

Posted: Sat Nov 12, 2005 1:21 pm
by mchaggis
You could ry:

Code: Select all

$mytempfile = tempname( dirname( $_SERVER['SCRIPT_FILENAME'] ) );