To add a symbolic link. use: symlink('/tmp/dir1', '/tmp/dir2');
To remove a symbolic link use : unlink(filename);