<HTML ><HEAD ><TITLE >php_stream_fopen_temporary_file</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Streams File API Reference" HREF="streams.file-api.html"><LINK REL="PREVIOUS" TITLE="php_stream_fopen_tmpfile" HREF="streams.php-stream-fopen-tmpfile.html"><LINK REL="NEXT" TITLE="Streams Socket API Reference" HREF="streams.socket-api.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="streams.php-stream-fopen-tmpfile.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="streams.socket-api.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="streams.php-stream-fopen-temporary-file" ></A >php_stream_fopen_temporary_file</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN102719" ></A ><P > (no version information, might be only in CVS)</P >php_stream_fopen_temporary_file -- Generate a temporary file name and open a stream on it</DIV ><DIV CLASS="refsect1" ><A NAME="AEN102722" ></A ><H2 >Description</H2 >php_stream * <B CLASS="methodname" >php_stream_fopen_temporary_file</B > ( const char * dir, const char * pfx, char ** opened)<BR ></BR ><P > <B CLASS="function" >php_stream_fopen_temporary_file()</B > generates a temporary file name in the directory specified by <TT CLASS="parameter" ><I >dir</I ></TT > and with a prefix of <TT CLASS="parameter" ><I >pfx</I ></TT >. The generated file name is returns in the <TT CLASS="parameter" ><I >opened</I ></TT > parameter, which you are responsible for cleaning up using <B CLASS="function" >efree()</B >. A stream is opened on that generated filename in "w+b" mode. The file is NOT automatically deleted; you are responsible for unlinking or moving the file when you have finished with it. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="streams.php-stream-fopen-tmpfile.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="streams.socket-api.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >php_stream_fopen_tmpfile</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="streams.file-api.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Streams Socket API Reference</TD ></TR ></TABLE ></DIV ></BODY ></HTML >