Join Up!
104886 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previoussymlinktmpfilenext
Last updated: Sun, 27 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to German | Spanish

tempnam

(PHP 3, PHP 4 )

tempnam -- Vytvoří soubor s unikátním názvem

Popis

string tempnam ( string dir, string prefix)

Ve specifikovaném adresáři vytvoří dočasný soubor s unikátním názvem. Pokud adresář neexistuje, tempnam() může vytvořit soubor v systémovém adresáři pro dočasné soubory.

Chování funkce tempnam() je závislé na platformě. Na Windows má parametr dir přednost před systémovou proměnnou TMP, na Linuxu má předost proměnná TMPDIR a SVR4 vždy použije parametr dir, pokud tento adresář existuje. Podívejte se do dokumentace k vašemu systému na funkci tempnam(3).

Vrací název nového dočasného souboru, při chybě pak řetězec NULL.

Příklad 1. tempnam() příklad

$tmpfname = tempnam ("/tmp", "FOO");

Poznámka: Chování této funkce bylo změněno ve verzi 4.0.3. The temporary file is also created to avoid a race condition where the file might appear in the filesystem between the time the string was generated and before the the script gets around to creating the file.

Viz také tmpfile().

User Contributed Notes
tempnam
add a note about notes
There are no user contributed notes for this page.
previoussymlinktmpfilenext
Last updated: Sun, 27 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST