Related Content
Changing Memory Allocation In Phing
Running complex tasks in Phing can mean running out of memory, especially when altering or changing lots of files. I was recently working on a image sorting Phing project that sorted images based on EXIF information.
Listing Phing Targets In A Project
Providing a Phing build file along with a project is a good way of allowing automation of certain aspects of the project. The only trouble is that users won't know what's in the build file unless they open it or just run it.
Control Structures In Phing
Phing has a few different tasks and elements that allow you to select paths of code execution depending on what you need to happen in a build file. These are limited to loops and if statements, but a lot of functionality can be covered with just a couple of lines of XML.
Source Controlled Git Hooks With Phing
The other day I was experimenting with Git hooks. These are scripts that you can execute before certain actions are run in Git. For example, you might want to ensure that forced updates are not run, ensuring respository files have the correct permissions after merging, or that the files have ASCII standard names before being committed.
Detecting The Sudo User In Phing
I use Phing for a lot of different tasks, it helps me to automate things that I would otherwise mess up if left to my own devices. Prime candidates for Phing scripts are things that I don't do that much and forget how to do them, or that have a number of complex steps.
Checking Syntax Errors In PHP And JavaScript Using Phing
Checking Syntax Errors In PHP And JavaScript Using Phing
Running a simple syntax check over your files is a good way to save time. This can be when testing code but best practice is to not to even commit code that contains syntax errors.
Comments
I have two questions:
1. Do you know how long it would take to ftp a site that's about 100mb in size (I noticed you only transfer 1 file, hence the 2.5 seconds benchmark)
2. Does setting the transfer mode to binary mean that text files are set to binary? and what about the permissions once they've been transfered?
Thanks,
Jens
Submitted by Jens on Thu, 02/25/2010 - 00:43
Permalink1) Transferring 100mb would take as long as your connection allows.
2) I would recommend you use binary as the default for FTP as the other setting (ascii) can do odd things to unicode text files.
The following page quite a bit of detail on the subject:
http://courses.wccnet.edu/computer/mod/na36c.htm
Phing doesn't yet provide a mechanism to alter the permissions of a file. This must therefore be done with ftp_chmod(), which is part of the FTP functions available in PHP.
Submitted by giHlZp8M8D on Thu, 02/25/2010 - 09:11
PermalinkAdd new comment