PHP/File Directory/symlink
Making a symbolic link
<source lang="html4strict">
<?php symlink("/usr/local/images","/www/docroot/images") or die($php_errormsg); ?>
</source>
symlink.php
<source lang="html4strict">
<?php
$link = symlink("/www/htdocs/stats/2003", "/www/htdocs/stats/03");
?>
</source>
Working with Links
<source lang="html4strict">
<?
$result = link("/home/paul/myfile.txt", "/home/andrew/myfile.txt"); if (!$result) { echo "Hard link could not be created!\n"; } else { $result = symlink("/home/paul/myfile.txt", "/home/andrew/myfile.txt"); if (!$result) { echo "Symlink could not be created either!\n"; } }
?>
</source>