<?php
bool symlink ( str $target , str $link )
where,
$target = Target of the link
$link = The link name
?>
<?php
define('PATH2TPN', __DIR__ . '/adds');
// You can establish other paths
// to create a new symbolic link
$trg01 = PATH2TPN;
echo $trg01 . '<br><br>';
$lnk01 = 'symlk01';
$yn01 = symlink($trg01, $lnk01);
if($yn01 == true)
{
echo 'The symbolic link named: ' .
$lnk01 . ' was created as expected.<br><br>';
}
else
{
echo 'The symbolic link named: ' .
$lnk01 . ' was NOT created as expected.<br><br>';
}
?>
<?php
define('PATH2TPN', __DIR__ . '/temp/t2/t2a');
// You can establish other paths
// to create a new symbolic link
$trg02 = PATH2TPN;
echo $trg02 . '<br><br>';
$lnk02 = 'symlk02';
$yn02 = @symlink($trg02, $lnk02);
if($yn02 == true)
{
echo 'The symbolic link named: ' .
$lnk02 . ' was created as expected.<br><br>';
}
else
{
echo 'The symbolic link named: ' .
$lnk02 . ' was NOT created as expected.<br><br>';
}
?>
<?php
define('PATH2TPN', __DIR__);
$trg03 = PATH2TPN . "/temp/t3";
// You can establish other paths
// to create a new symbolic link
$lnk03 = 'symlk03';
$yn03 = @symlink($trg03, $lnk03);
if($yn03 == true)
{
echo 'The symbolic link named: ' .
$lnk03 . ' was created as expected.<br><br>';
}
else
{
echo 'The symbolic link named: ' .
$lnk03 . ' was NOT created as expected.<br><br>';
}
?>
<?php
$trg04 = __DIR__ . "/t1";
// You can establish other paths
// to create a new symbolic link
$lnk04 = 'symlk04';
$yn04 = @symlink($trg04, $lnk04);
if($yn04 == true)
{
echo 'The symbolic link named: ' .
$lnk04 . ' was created as expected.<br><br>';
}
else
{
echo 'The symbolic link named: ' .
$lnk04 . ' was NOT created as expected.<br><br>';
}
?>