laravel 通过ftp上传的时候报错 Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY
用Laravel中的filesystems里面的ftp上传文件时报错。在windows上开发,文件上传的时候碰到上面的问题,搜了些资料,发现是php7的ftp拓展默认未开启。
filesystems是这样配置的
'szxs_file_ftp' =>[
'driver' => 'ftp',
'host' => '39.xx.xx.xx',
'username' => 'xxx',
'password' => 'xxx',
'root' => '/data',
'passive' => false,
'timeout' => ,
],
控制器测试的时候报错:
Storage::disk('szxs_file_ftp')->put('data/1.txt', "ftp123456");
$exists = Storage::disk('szxs_file_ftp')->exists('data/1.txt');
第一步:检查extension里面有没有ftp.dll拓展:
我的拓展默认目录是:
D:\phpStudy\php\php-7.1.9-nts\ext
第二步:进到php.ini里面去,解开以下注释:
extension=php_ftp.dll
这个扩展是php自带的,直接去掉注释即可.
再次测试,就不报这个错误了。
参考链接:https://stackoverflow.com/questions/34173996/php-7-ftp-extension-is-not-loaded-in-windows-7/34174158
原创地址:http://blog.csdn.net/zhezhebie/article/details/77969565
laravel 通过ftp上传的时候报错 Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY的更多相关文章
- FTP上传文件,报错java.net.SocketException: Software caused connection abort: recv failed
FTP上传功能,使用之前写的代码,一直上传都没有问题,今天突然报这个错误: java.net.SocketException: Software caused connection abort: re ...
- iOS---用Application Loader 上传的时候报错No suitable application records were found. Verify your bundle identifier 'xx' is correct
用Application Loader 上传的时候报错,突然发现用Application Loader的账号 竟然不是公司的账号 换成公司的账号 就可以了.
- Nginx反向代理上传大文件报错(failed to load resource : net :: ERR_CONNECTION_RESET)
转自: https://blog.csdn.net/kinginblue/article/details/50753271?locationNum=14&fps=1 Nginx反向代理上传大文 ...
- Windows下解决github push failed (remote: Permission to userA/XXXX.git denied to userB.) 上传gitHub失败报错
Windows环境下解决 github push failed (remote: Permission to userA/XXXX.git denied to userB.) · 初学GitHub的朋 ...
- iOS上传App Store报错:this action cannot be completed -22421 解决方案
最近swift项目升了xcode8,提交版本时,遇到这个: this action cannot be completed -22421 瞬间懵逼,连具体报错原因都没有,只有一个代码 22421,找了 ...
- Hadoop上传文件的报错
baidu了很多,都说防火墙,datanode没有正常启动的问题,可是检查了都是正常,后来还是在老外的网站上找到了解决的方法 修改了/etc/security/limits.conf文件,上传成功 这 ...
- Ajax使用formdata异步上传文件,报错the request was rejected because no multipart boundary was found
基于jQuery的Ajaxs使用FormData上传文件要注意两个参数的设定 processData设为false 把processData设为false,让jquery不要对formData做处理, ...
- 关于新项目上传远程库报错 non-fast-forward
已有项目上传远程库会报错 non-fast-forward 首先使用命令行 git pull origin master --allow-unrelated-histories 之所以使用这个命令,是 ...
- docker上传私有仓库报错
docker 1.17 版本搭建私有仓库,上传镜像报错:server gave HTTP response to HTTPS client” 系统环境:centos7docker版本:1.17(注意版 ...
随机推荐
- 多选文件批量上传前端(ajax*formdata)+后台(Request.Files[i])---input+ajax原生上传
1.配置Web.config;设定上传文件大小 <system.web> <!--上传1000M限制(https://www.cnblogs.com/Joans/p/4315411. ...
- StringComparison 枚举
地址:https://docs.microsoft.com/zh-cn/dotnet/api/system.stringcomparison?redirectedfrom=MSDN&view= ...
- python温度转换代码
#TempConvert.py TempStr=input("请输入带有符号的温度值:")#赋值TempStr,括号里面的是提示 if TempStr[-1] in ['F','f ...
- openstack创建实例时aborted: Block Device Mapping is Invalid
问题产生原因: 直接先不创建新卷,点击否,待实例创建完毕后再分配卷.
- k8s安装之prometheus.yaml
这个系列的东东满多的.要另开系列说明. 这里为了内容连续完成,先贴一个吧,其它configmap,exporter就不展示. 为了保持统一,将prometheus也放到二级目录了. - '--web. ...
- linux下svn的使用
环境搭建: yum install subversion yum安装svn服务 svn --version 检查是否安装 cd /usr/local/svn/conf 找到conf 文件 ...
- java 获取某年某月最后一天
Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, 2016); calendar.set(Calendar ...
- Windows窗体控件实现内容拖放(DragDrop)功能
一.将控件内容拖到其他控件 在开发过程中,经常会有这样的要求,拖动一个控件的数据到另外一个控件中.例如将其中一个ListBox中的数据拖到另一个ListBox中.或者将DataGridView中的数据 ...
- 不安装Oracle客户端使用PLSQL Developer
一.下载 1.Oracle Instant Client: (需要安装 Visual Studio 2013 redistributable.) basic-windows.x64-18.5下载地址: ...
- Linux中修改环境变量
<1>Linux 的变量作用范围可分为两类:环境变量和本地变量 环境变量,或者称为全局变量,存在与所有的shell 中,在你登陆系统的时候就已经有了相应的系统定义的环境变量了.Linux ...