PHP Manual

  • English French German Portuguese Spanish
Manual de PHP Referencia de funciones Extensiones relacionadas con el sistema de ficheros Sistema de Ficheros Funciones del Sistema de Archivos symlink
Funciones del Sistema de Archivos basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputcsv fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable lchgrp lchown link linkinfo lstat mkdir move_uploaded_file parse_ini_file parse_ini_string pathinfo pclose popen readfile readlink realpath_cache_get realpath_cache_size realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink
  • stat
  • tempnam

symlink

(PHP 4, PHP 5)

symlink — Crea un enlace simbólico

Descripción

bool symlink ( string $target , string $link )

symlink() crea un enlace simbólico al objetivo target existente con el nombre especificado en link.

Parámetros

target

Objetivo del enlace.

link

El nombre del enlace.

Valores devueltos

Devuelve TRUE en caso de éxito o FALSE en caso de error.

Historial de cambios

Versión Descripción
5.3.0 Esta función ahora es compatible con las plataformas Windows (Vista, Server 2008 o superior).

Ejemplos

Ejemplo #1 Crear un enlace simbólico

<?php
$objetivo 
= 'subidas.php';
$enlace = 'subidas';
symlink($objetivo, $enlace);

echo 
readlink($enlace);
?>

Notas

Nota: Los usuarios de Windows deberían observar que esta función sólo funcionará si el sistema donde se ejecuta PHP es Windows Vista/Windows Server 2008 o superior. Las versiones anteriores de Windows no admiten enlaces simbólicos.

Ver también

  • link() - Crea un enlace duro
  • readlink() - Devuelve el objetivo de un enlace simbólico
  • linkinfo() - Obtiene información acerca de un enlace

© Copyright © 2001-2015 The PHP Group.

© Copyright 2014. Diseñado por PHP Manual usando jfCMS.