tempnam()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

tempnam()

Post 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].
User avatar
mchaggis
Forum Contributor
Posts: 150
Joined: Mon Mar 24, 2003 10:31 am
Location: UK

Post by mchaggis »

You could ry:

Code: Select all

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