win10添加软连接

时间:2020-04-06 19:04:05   收藏:0   阅读:458

 

 php 文件创建连接

$src = __DIR__.‘\upload‘;
$target = __DIR__.‘\backend\web\upload‘;
$res = exec("mklink /d ".$target." ".$src);
先目标的目录 后是源目录



Without any extra options, mklink creates a symbolic link to a file. The below command creates a symbolic, or “soft”, link at Link pointing to the file Target :

mklink Link Target

Use /D when you want to create a soft link pointing to a directory. like so:

mklink /D Link Target

Use /H when you want to create a hard link pointing to a file:

mklink /H Link Target

Use /J to create a hard link pointing to a directory, also known as a directory junction:

mklink /J Link Target

来源:https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

原文:https://www.cnblogs.com/shaoyang0123/p/12643322.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!