Unix and Linux Discussions Tagged with temp |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
4 |
3,964 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
13,721 |
Cybersecurity |
|
|
|
0 |
11,460 |
Windows & DOS: Issues & Discussions |
|
|
|
10 |
3,270 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,601 |
Shell Programming and Scripting |
|
|
|
1 |
12,718 |
Forum Support Area for Unregistered Users & Account Problems |
|
|
|
1 |
2,444 |
Shell Programming and Scripting |
|
|
|
6 |
13,048 |
Filesystems, Disks and Memory |
|
|
|
3 |
5,459 |
AIX |
|
|
|
1 |
2,413 |
AIX |
|
|
|
3 |
4,141 |
Shell Programming and Scripting |
|
|
|
0 |
1,172 |
Software Releases - RSS News |
|
|
|
1 |
13,869 |
Linux |
|
|
|
0 |
5,410 |
Ubuntu |
|
|
|
4 |
9,241 |
Programming |
|
|
|
5 |
16,927 |
Cybersecurity |
|
|
|
6 |
3,880 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,965 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
9,149 |
IP Networking |
|
|
|
1 |
9,733 |
Shell Programming and Scripting |
|
|
|
1 |
2,849 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
9,627 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
4,986 |
IP Networking |
|
|
|
3 |
5,246 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
7,707 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,151 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
5,730 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
5,349 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
15,664 |
UNIX for Dummies Questions & Answers |
|
|
|
9 |
12,939 |
IP Networking |
|
|
|
2 |
3,199 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
2,729 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,745 |
IP Networking |
|
|
|
7 |
6,976 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,832 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,852 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,223 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,596 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
4,265 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
4,351 |
UNIX for Dummies Questions & Answers |
TMPFILE(3) 1 TMPFILE(3)
tmpfile - Creates a temporary file
SYNOPSIS
resource tmpfile (void )
DESCRIPTION
Creates a temporary file with a unique name in read-write (w+) mode and returns a file handle .
The file is automatically removed when closed (for example, by calling fclose(3), or when there are no remaining references to the file
handle returned by tmpfile(3)), or when the script ends.
For details, consult your system documentation on the tmpfile(3) function, as well as the stdio.h header file.
RETURN VALUES
Returns a file handle, similar to the one returned by fopen(3), for the new file or FALSE on failure.
EXAMPLES
Example #1
tmpfile(3) example
<?php
$temp = tmpfile();
fwrite($temp, "writing to tempfile");
fseek($temp, 0);
echo fread($temp, 1024);
fclose($temp); // this removes the file
?>
The above example will output:
writing to tempfile
SEE ALSO
tempnam(3), sys_get_temp_dir(3).
PHP Documentation Group TMPFILE(3)