System::mktemp

System::mktemp – Crea archivos o directorios temporales

Synopsis

require_once "System.php";

mixed System::mktemp ( string $args = = null )

Description

Crea archivos o directorios temporales. Esta función eliminará los archivos creados cuando el script finalize su ejecución.

Parameter

  • string $args - TLos argumentos

    • prefix - Cadena que se empleará como prefijo del nombre temporal (por defecto tmp)

    • -d - Se creará un directorio temporal en lugar de un archivo.

    • -t - El directorio de destino donde el archivo o directorio temporal será creado. Si se omite este parámetro, por defecto la variable de entorno TMP en Windows o TMPDIR en Unix será empleada. Si tampoco se encuentran dichas variables c:\windows\temp o /tmp serán empleados.

Return value

mixed - el path completo al archivo o directorio creado, o FALSE

Note

This function can be called statically.

Example

Usando mktemp()

<?php
$tempfile 
System::mktemp("prefix");       
$tempdir  System::mktemp("-d prefix");
$tempfile System::mktemp();
$tempfile System::mktemp("-t /var/tmp prefix");
?>
concatena archivos (Previous) Obtiene el path del directorio temporal (Next)
Last updated: Thu, 24 May 2012 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.