dongpao5127 2013-08-22 07:31
浏览 26

phing文件无法上传

I just started with phing. Below is my code. There are no errors coming regarding connection. The only error it is giving is File could not be uploaded.

I don't have a clue how to resolve this. I mean I am not really able to debug this with this small information. Can anyone tell how to debug this? The wierd thing is phing was able to create/upload folder but it was unable to upload file in that folder. Am I missing something here?

<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloWorld" default="deploy" basedir="." description="a demo project">
 <property name="message" value="Hello World!"/>
 <property name="builddir" value="build"/>
 <property name="srcDir" value="src"/>
 <property name="ftp.destination.host" value="<host>"/>
 <property name="ftp.destination.port" value="<port>"/>
 <property name="ftp.destination.username" value="<user>"/>
 <property name="ftp.destination.password" value="<pass>"/>
 <property name="ftp.destination.dir" value="/upload"/>
 <property name="ftp.destination.mode" value="binary"/>

 <target name="deploy">
    <echo msg="preparing local build directory..." />
    <delete dir="${builddir}" />
    <mkdir dir="${builddir}" />
    <copy todir="${builddir}" overwrite="true">
        <fileset dir="./" id="Files">
            <include name="**" />
            <exclude name="build/" />
            <exclude name="build.*" />
            <exclude name="docs/" />
            <exclude name="tests/" />
        </fileset>
    </copy>

    <echo msg="FTPing up build..." />
    <ftpdeploy
        host="${ftp.destination.host}"
        port="${ftp.destination.port}"
        username="${ftp.destination.username}"
        password="${ftp.destination.password}"
        dir="${ftp.destination.dir}"
        mode="${ftp.destination.mode}" >
        <fileset dir="${builddir}">
            <include name="**" />
        </fileset>
    </ftpdeploy>

    <echo msg="Site deployed..." />
</target>


</project>
  • 写回答

1条回答 默认 最新

  • dpk20361 2014-08-04 21:18
    关注

    Try adding the attribute

    passive="true"
    

    in the ftpdeploy tag.

    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算