System::mktemp

System::mktemp -- Create temporary files or directories

概要

require_once "System.php";

mixed System::mktemp ([string $args = NULL])

説明

Creates temporary files or directories. This function will remove the created files when the scripts finish its execution.

パラメータ

返り値

mixed - the full path of the created file or dir, or FALSE

注意

この関数は、スタティックにコールする ことができます。

参照

mktemp man page

例 26-1Using mktemp()


<?php
$tempfile = System::mktemp("prefix");       
$tempdir  = System::mktemp("-d prefix");
$tempfile = System::mktemp();
$tempfile = System::mktemp("-t /var/tmp prefix");
?>