2011年10月4日星期二

ZendCasts.com: Fun with Phar


New today on ZendCasts.com there's a screencast tutorial about using phar archives in your applications.



Phar is a new thing that's developed on the horizon over the last few years that's essentially a PHP archive or library.


He shows how to set up a basic application (non-Zend Framework) that does a "hello world" sort of output showing a date "next week". Also included are the commands to bundle it up into a phar archive using the features already built into PHP. The build stub uses the buildFromDirectory and compression/buffering. He also points out a common problem with the default settings on many PHP installed - an INI setting that disables phar creation. Thankfully, it's easy to change via a ini_set call updating the "phar.readonly" setting.

没有评论:

发表评论