Working with Links : symlink « File Directory « PHP






Working with Links

 
<?
    $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";
            }
    }
?>
  
  








Related examples in the same category

1.Making a symbolic link
2.symlink.php