Mega Code Archive

 
Categories / Php / File Directory
 

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