jsherk Posted June 20, 2007 Share Posted June 20, 2007 How do I create a symbolic in Linux from a PHP program, using the ln -s command? Here is the command line I would type, but I'm not sure how to call it from php... ln -s home/mydomain/files/file home/mydomain/public_html/files/file Thanks Link to comment https://forums.phpfreaks.com/topic/56470-create-a-symbolic-in-linux-from-php/ Share on other sites More sharing options...
trq Posted June 21, 2007 Share Posted June 21, 2007 Either of.... exec('ln -s home/mydomain/files/file home/mydomain/public_html/files/file'); or link('ln -s home/mydomain/files/file', 'home/mydomain/public_html/files/file'); Link to comment https://forums.phpfreaks.com/topic/56470-create-a-symbolic-in-linux-from-php/#findComment-278965 Share on other sites More sharing options...
jsherk Posted June 21, 2007 Author Share Posted June 21, 2007 Yes, thanks that got me on the right path, and I think I found what I need... The link() command is for hard links, but I want to create a soft link or symbolic link. The command is (obviously enough) symlink(), but I think it is only available on Linux. I found some good examples of it here: http://us2.php.net/manual/en/function.symlink.php Link to comment https://forums.phpfreaks.com/topic/56470-create-a-symbolic-in-linux-from-php/#findComment-279043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.