codeigniter フレームワークを使用してサイトを開発しています。私はPHINGを理解しようとしています。最初は、xml ファイルを作成すると、そのフォルダー構造が構築されると思いました。しかし、ドキュメントを読むと、ローカル ホストからリモート ホストにファイルをコピーしているようです。
システムからリモートホストにすべてのファイルをコピーしますか? それとも私が間違っていますか?もしそうなら、filezillaでファイルを手動でコピーするのとどう違うのですか?
次に、ファイルをコピーする場合...その機能をローカルホストでテストしたいと思います。Googleで次のスクリプトを見つけました。ホスト名を localhost に変更して試しましたが、ホストに接続できないと表示されます。以前にローカルホストでテストしたことがある場合は、その方法を教えてください。
<?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>