PHP 7.0.5:使用未定义的常量FTP_BINARY-假定为'FTP_BINARY' [英] PHP 7.0.5: Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY'
问题描述
在Windows IIS上升级到PHP 7.0.5(最后是因为sqlsrv PDO驱动程序可用).我正在使用Laravel 5.1,并且尝试连接到FTP驱动器时,我从
Upgrading to PHP 7.0.5 on Windows IIS (finally since the sqlsrv PDO drivers are available). I'm using Laravel 5.1 and when trying to connect to an FTP drive I get the following error from https://github.com/thephpleague/flysystem/blob/master/src/Adapter/Ftp.php#L19.
Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY'
这是一个用于传输的PHP常量,因此应该没有问题,文档中也没有任何东西可以表明它已被弃用或其他任何东西. FTP_ASCII相同.我唯一要做的就是更改PHP版本+ SQL驱动程序.
This is a PHP constant for the transfer, so shouldn't have a problem and there's nothing in the docs to say it's deprecated or anything. FTP_ASCII is the same. The only thing i've done is change the PHP version + SQL drivers.
参考: http://php.net/manual/en/function. ftp-put.php
推荐答案
事实证明,默认情况下,PHP7中未打开FTP,并且具有php5.6没有的扩展名: 在Windows 7中未加载PHP 7 FTP扩展
Turns out that FTP is not turned on in PHP7 by default and has an extension that php5.6 doesn't have: PHP 7 FTP extension is not loaded in Windows 7
这篇关于PHP 7.0.5:使用未定义的常量FTP_BINARY-假定为'FTP_BINARY'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!