duanjianao0592 2011-04-19 13:29
浏览 337
已采纳

在PHP cURL中设置FTP模式

I have some code that is using the PHP cURL library to upload some files via FTP.

I've been told to switch the FTP mode from passive to active, but I can't find how to do that - there doesn't seem to be an option in the documentation relating to it. I'm not actually sure what mode it is currently using, or how I can view that.

  • 写回答

3条回答 默认 最新

  • drxd54816 2012-04-18 20:44
    关注

    The answer to this question is to use:

    $curl = curl_init()
    curl_setopt($curl, CURLOPT_FTP_USE_EPRT, true);
    

    this will allow you to do Active ftp uploads.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 我这个代码哪里有问题 acm 平台上显示错误 90%,我自己运行好像没什么问题
  • ¥50 C#编程中使用printDocument类实现文字排版打印问题
  • ¥15 找会编程的帅哥美女 可以用MATLAB里面的simulink编程,用Keil5编也可以。
  • ¥15 已知隐函数其中一个变量τ的具体值,求另一个变量
  • ¥15 r语言Hurst指数
  • ¥15 Acrn IVSHMEM doorbell问题
  • ¥15 yolov5中的val测试集训练时数量变小问题
  • ¥15 MPLS/VPN实验中MPLS的配置问题
  • ¥15 materialstudio氢键计算问题
  • ¥15 echarts图表制作