Convert a PHP script into a stand-alone windows ex

2018-12-31 18:42发布

I want to automate a fairly simple task. For this I have written a small PHP script which I run from the command line using PHP-CLI. Now I want to hand over this script to someone but I do not want to:

  • give away the source code
  • ask him to install PHP on the system

Is there a way to create a .exe version of the PHP script. I am really not much worried about de-compilation; I am more worried about asking people to install and configure PHP.

8条回答
十年一品温如言
2楼-- · 2018-12-31 19:09

RapidEXE is exactly for this job:

It converts a php project to a standalone exe. I had enough of all other compilers, tried them one by one and they all disappointed me one way or another. Be my guest, feedbacks are always welcome!

Side note: the mechanism behind it is quite similar to the WinRAR SFX approach; extract engine, extract source, then run. It's just faster and easier to work with. One-command compilation, compressed, smart unpack, auto cleanup, easy config, full control of php engine & version; also extensible with minimal effort.

Happy developing!

查看更多
与君花间醉酒
3楼-- · 2018-12-31 19:10

My experience in this matter tells me , most of these software work good with small projects .
But what about big projects? e.g: Zend Framework 2 and some things like that.
Some of them need browser to run and this is difficult to tell customer "please type http://localhost/" in your browser address bar !!

I create a simple project to do this : PHPPy

This is not complete way for create stand alone executable file for running php projects but helps you to do this.
I couldn't compile python file with PyInstaller or Py2exe to .exe file , hope you can.
You don't need uniformserver executable files.

查看更多
登录 后发表回答