PHP 7.0.5: Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY'

左心房为你撑大大i 提交于 2019-12-10 15:39:03

问题


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'

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.

Reference: http://php.net/manual/en/function.ftp-put.php


回答1:


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



来源:https://stackoverflow.com/questions/36694483/php-7-0-5-use-of-undefined-constant-ftp-binary-assumed-ftp-binary

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!