这个链接可能对你有用。你能具体说明一下为什么不想让文件暂时存在文件系统中吗? http://www.clker.com/blog/2008/03/27/creating-a-tar-gz-on-the-fly-using-php/