I am developing a site using codeigniter framework. I am trying to understand PHING. At first I thought if we write some xml file it builds that folder structure. But when I read the documentation it seems to copy files from local to remote host.
Does it copy all the files from your system to remote host? Or am I wrong? If so how is it different from copying files manually in filezilla?
Secondly if it copies the files...I want to test that functionality in localhost. I found following script on google. I changed hostname to localhost and tried but it is saying it cannot connect to the host. If anyone tested on localhost before can you please tell me how to do it?
<?xml version="1.0" ?>
<project name="Shared hosting deployment" default="deploy-application-files" basedir=".">
<property name="ftp.host" value="localhost" />
<property name="ftp.port" value="21" />
<property name="ftp.username" value="uname" />
<property name="ftp.password" value="pass" />
<property name="ftp.dir" value="C:\wamp\www\mlp_phing" />
<property name="ftp.mode" value="ascii" />
<!-- FILESETS -->
<fileset dir="." id="files.images">
<include name="images/**/*" />
<include name="favicon.ico" />
</fileset>
<fileset dir="." id="files.application">
<include name="system/application/**/*" />
<include name="css/*" />
<include name="js/*" />
</fileset>
<fileset dir="." id="files.system">
<include name="system/**/*" />
<exclude name="system/application/**/*" />
<include name="index.php" />
<include name="robots.txt" />
<include name=".htaccess" />
</fileset>
<!-- DEPLOYMENT TARGETS -->
<target name="deploy">
<echo message="Copying fileset '${deploy.fileset.refid}' to ${ftp.host} in ${ftp.mode} mode" />
<ftpdeploy
host="${ftp.host}"
port="${ftp.port}"
username="${ftp.username}"
password="${ftp.password}"
dir="${ftp.dir}"
mode="${ftp.mode}">
<fileset refid="${deploy.fileset.refid}" />
</ftpdeploy>
</target>
<target name="deploy-images">
<echo msg="Deploying image files" />
<phingcall target="deploy">
<property name="deploy.fileset.refid" value="files.images" />
<property name="ftp.mode" value="binary" override="true" />
</phingcall>
</target>
<target name="deploy-application-files">
<echo msg="Deploying application files" />
<phingcall target="deploy">
<property name="deploy.fileset.refid" value="files.application" />
</phingcall>
</target>
<target name="deploy-system-files">
<echo msg="Deploying system files" />
<phingcall target="deploy">
<property name="deploy.fileset.refid" value="files.system" />
</phingcall>
</target>
<target name="deploy-all">
<phingcall target="deploy-images" />
<phingcall target="deploy-application-files" />
<phingcall target="deploy-system-files" />
</target>
</project>