http://www.phpe.net/articles/314.shtml  这篇文章可以参考一下