PHP编译器 [英] PHP compiler for windows

查看:153
本文介绍了PHP编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个命令行php应用程序,我需要分发给客户端。我只是想给他们一个可执行文件,而不是安装php的说明)



什么是一个好的php编译器窗口,包括支持php 5,curl,和我使用的一些其他库?



我需要控制内存和时间限制使用,所以我必须能够使用自定义php.ini。 (这应该也包装在exe中,而不是一个单独的文件)



此外,我不想让代码很容易提取。这不是一个巨大的要求,但我不想在十六进制编辑器中查看源代码。



我在Google上有几个匹配,但如果



如果我知道我将分发给客户端,当我开始,我会使用C#。但我没有。现在他们想买。它需要死亡简单。一个可执行文件包含php解释器和我的脚本加上一个入口点,当运行exe时启动我的脚本。



如果我不需要重新分发dll,也会很好。



edit2



我在寻找 phc roadend 。 phc不支持windows,而roadsend不支持windows中的php5。

解决方案

好吧,我想出来了。有一个名为 phc-win 的开源程序。它支持php 5.3.1,将脚本编译为字节码(混淆!),使用简单(它甚至有一个gui)。



它需要一个php-embed .ini和你使用的DLL,但它只是工作。



感谢所有的答案大家!


phc-win 0.3.1(c)2009 Andrew
Fitzgerald -
contact@swiftlytilting.com PHP
版本:5.3.1




  • 要编译单个文件:






  • >要构建一个包含目录中所有文件和所有sub
    目录的EXE:




    • 从文件中选择编译目录

    • 选择项目文件夹。

    • 选择主程序文件。


    • 所有扩展名中任何位置的php文件都将被编译成
      .phb文件。

    • 这些.phb文件以及目录树中的所有文件将被添加到项目EXE中


    • <




      • CONSOLE(显示DOS框)

      • <

    • 将EXE



如果需要,可以在相同目录中找到所需的DLL文件和
php-embed.ini文件。

I have a command line php app that I need to distribute to a client. I just want to give them an executable, not instructions for installing php ;)

What is a good php compiler for windows that includes support for php 5, curl, TLS, and a few other libs I use?

I need to control memory and time limit usage, so I must be able to use a custom php.ini. (this should be packaged in the exe as well, not a separate file)

Additionally, I don't want the code to be easily extracted. This isn't a huge requirement, but I'd rather not have the source viewable in a hex editor.

I've got a few hits on Google, but if anyone has actually used one, your feedback would be invaluable.

edit

If I knew I was going to distribute this to the client when i started, I'd have used C#. But I didn't. Now they want to buy it. It needs to be DEAD SIMPLE. one executable containing the php interpreter and my script plus an entry point to start my script when the exe is run.

It would also be great if I didn't have to redistribute dll's either.

edit2

I am look for somthing along the lines of phc, or roadsend. phc doesn't support windows, and roadsend doesn't support php5 in windows.

解决方案

Okay I figured it out. there is a open source program called phc-win. It supports php 5.3.1, compiles scripts to byte code (obfuscation!) and is simple to use (It even has a gui).

It needs a php-embed.ini and whatever DLL's you use, but it just works.

Thanks for all the answers everyone!

phc-win 0.3.1 (c) 2009 Andrew Fitzgerald - contact@swiftlytilting.com PHP Version: 5.3.1

  • To compile a single file:

    • Choose 'Compile single file' from the File menu.
    • Then select the file to compile.
  • To build an EXE containing all files in a directory and all sub directories:

    • Choose 'Compile directory' from the File menu.
    • Select the project folder.
    • Select the main program file.
    • phc-win will then recursively scan the specificed directory.
    • All files with 'php' anywhere in the extension will be compiled into .phb files.
    • These .phb files, along with all files in the directory tree will be added to the project EXE.

    • Once the EXE has been created, you will be asked about the EXE type:

      • CONSOLE (displays DOS box)
      • WINDOWS (no DOS box).
  • Place the EXE in the same directory with the required DLL file(s) and php-embed.ini file if needed.

这篇关于PHP编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆