English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

PHP symlink() Function Usage and Example

PHP Filesystem Reference Manual

The symlink() function can create a symbolic link from an existing target with a specified name and return true on success, or false on failure.

Syntax

bool symlink ( string $target , string $link )

This function can create a symbolic link to an existing target with a specified name.

Online Example

<?php
   $target = "/PhpProject/test.php";
   $link = "/test";
   symlink($target, $link);
   echo readlink($link);
?>
PHP Filesystem Reference Manual