dppxp79175 2011-04-27 08:55
浏览 25

一个Apache Ant任务来生成phar包?

I'm moving my php projects to phar packages and while Eclipse (I'm using e4.1) generates phars nicely, I have a problem with updating project's deployment ant scripts accordingly...

NOTE: I don't want to use ant's exec to call operating system's php runtime to do that. I cannot always rely on it to be there...

A. Is there an ant task which can generate phar packages?

B. Is there a way to call Eclipse's phar export task headlessly?

C. Is there a way to execute php script by ant using eclipse's php runtime?

  • 写回答

2条回答 默认 最新

  • dpw30157 2011-06-29 14:18
    关注

    The manual states:

    Phar archives can be distributed as tar archives, zip archives, or as the custom phar file format designed specifically for the phar extension. Each file format has advantages and disadvantages. The tar and zip file formats can be read or extracted by any third-party tool that can read the format, but require the phar extension in order to run with PHP. The phar file format is customized and unique to the phar extension, and can only be created by the phar extension or the PEAR package » PHP_Archive, but has the advantage that applications created in this format will run even if the phar extension is not enabled.

    So you can just zip some files up and name the resulting file .phar.

    评论

报告相同问题?

悬赏问题

  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来