PHP Upload files with FTP warning how to resolve

Source: Internet
Author: User
Tags ftp connection ftp upload file
This article is mainly to share with you php ftp upload file warning How to solve, company projects to use ft upload files, php extension method to upload the line, but the upload file has failed, directory list can not read, mainly reported this error.

PHP Warning:  ftp_put (): PORT command successful. Consider using PASV.

Online search for half a day, the original is the FTP passive mode is not open reasons.

Just use the method to turn on passive mode.

FTP_PASV (Ftp_connection,mode)
Ftp_connection Necessary. Specifies the FTP connection to use (the identifier for the FTP connection).
Mode

Necessary. prescribed mode.

  • TRUE = Passive mode on

  • FALSE = Passive mode off

Remember to specify the mode after login, so as to upload, read directory and other operations.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.