当前位置:网站首页>win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
2022-07-03 11:08:00 【ignativs amor】
背景
正在跟着文档学习文件存储模块,这里需要在配置文件filesystems设置自己想要的软连接
/* |-------------------------------------------------------------------------- | Symbolic Links |-------------------------------------------------------------------------- | | Here you may configure the symbolic links that will be created when the | `storage:link` Artisan command is executed. The array keys should be | the locations of the links and the values should be their targets. | */
'links' => [
public_path('storage') => storage_path('app/public'),
],

如文档所示:配置好以后,需要执行
- php artisan storage:link
软连接才能生效;
问题
但是我执行上述命令后,提示symlink (): Protocol error,这里让我想到的是,我本地安装的是homestead,不知道不是配置的问题,打开文档重新看一下;
在文档最后一步写着如下:
于是,我就复制了这段配置,但是我重新进入虚拟机以后,执行php artisan 命令,还是提示symlink (): Protocol error,即使加上sudo也还是这个错误,我这时候就开始百度了;
有人建议使用CMD的管理员身份去执行,就可以了;
结果
所以:
1、退出homestead并关闭vagrant
1、exit
2、vagrant halt

2、管理员进入CMD,然后进入虚拟机

然后执行php artisan命令:
显示执行成功,这时候我就可以直接访问storage目录下,上传的图片了;访问成功!!!
边栏推荐
- 836. Merge sets (day 63) and search sets
- Sheet1$. Output [excel source output] Error in column [xxx]. The returned column status is: "the text is truncated, or one or more characters have no matches in the target code page.".
- Hongmeng third training (project training)
- 牛牛的组队竞赛
- Cacti monitors redis implementation process
- How should intermediate software designers prepare for the soft test
- (database authorization - redis) summary of unauthorized access vulnerabilities in redis
- 2022年湖南工学院ACM集训第二次周测题解
- 《剑指offer 04》二维数组查找
- Web security summary
猜你喜欢
随机推荐
Notes on 32-96 questions of sword finger offer
Deploying WordPress instance tutorial under coreos
previous permutation lintcode51
Repo ~ common commands
OpenGL 绘制彩色的三角形
解决msvcp120d.dll和msvcr120d.dll缺失
Xml的(DTD,xml解析,xml建模)
GCC compilation process and dynamic link library and static link library
Wrong arrangement (lottery, email)
Vulnhub pyexp
phpcms 提示信息頁面跳轉showmessage
Solution to the second weekly test of ACM intensive training of Hunan Institute of technology in 2022
Kibana - installation and configuration of kibana
Concurrent programming - singleton
2022年湖南工学院ACM集训第二次周测题解
STL教程10-容器共性和使用场景
vulnhub之momentum
R language uses the aggregate function to calculate the mean value (sum) of dataframe data grouping aggregation without setting na The result of RM calculation. If the group contains the missing value
Qt OpenGL 纹理贴图
The excel table is transferred to word, and the table does not exceed the edge paper range









