★ wanayoo — archive 1999 http://fr.php.net/manual/fr/function.tmpfile.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<tempnamtouch>
view the version of this page
Last updated: Sun, 20 Apr 2003

tmpfile

(PHP 3>= 3.0.13, PHP 4 )

tmpfile -- Crée un fichier temporaire

Description

int tmpfile ( void)

tmpfile() crée un fichier temporaire avec un nom unique, ouvert en écriture, et retourne un pointeur de fichier, identique à ceux retournés par fopen(). Ce fichier sera automatiquement effacé lorsqu'il sera fermé (avec fclose()), ou lorsque le script sera terminé.

Pour plus de détails, consultez votre documentation système sur la fonction tmpfile(3), et sur stdio.h.

Voir aussi tempnam().



User Contributed Notes
tmpfile
add a note add a note
phpnovice at home-safe dot net
14-Apr-2003 12:28

First I wrote my script using the fancy proc_open() before I discovered my PHP was not at the necessary level.   Now I have to change it to use a temporary file for either the input or the output.  Then I started to write a version using tmpfile() only to discover it doesn't give me the file _name_ so that I can put that name in my command as the standard input redirect.  

For that purpose, if you don't have proc_open() available for bidirectional piping, it appears that tmpnam() is the right approach.

add a note add a note

<tempnamtouch>
 Last updated: Sun, 20 Apr 2003
show source | credits | stats | mirror sites 
Copyright © 2001-2003 The PHP Group
All rights reserved.
This mirror generously provided by: nexen.net
Last updated: Thu Jun 12 05:13:20 2003 CEST