博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
转换PHP脚本成为windows的执行程序
阅读量:6212 次
发布时间:2019-06-21

本文共 3945 字,大约阅读时间需要 13 分钟。

转换PHP脚本成为windows的执行程序

Convert a PHP script into a stand-alone windows executable

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.
php compiler obfuscation php-cli
我需要一个相当简单的自动化任务。我已经写了一个PHP脚本,我从php-cli命令行使用。现在我想让别人使用这个脚本,但我不想泄露把源代码,又不想叫他在系统中安装PHP
有一种方法来创建一个EXE版本的PHP脚本。我不太担心反编译;我更担心请人安装和配置PHP。
PHP编译PHP CLI混淆
Phalanger
http://www.php-compiler.net/
http://wiki.php-compiler.net/Phalanger_Wiki
http://phalanger.codeplex.com/
Phalanger is a project which was started at Charles University in Prague and was supported by Microsoft. It compiles source code written in the PHP scripting language into CIL (Common Intermediate Language) byte-code. It handles the beginning of a compiling process which is completed by the JIT compiler component of the .NET Framework. It does not address native code generation nor optimization. Its purpose is to compile PHP scripts into .NET assemblies, logical units containing CIL code and meta-data.
Bambalam
http://www.bambalam.se/bamcompile/
Bambalam PHP EXE Compiler/Embedder is a free command line tool to convert PHP applications to standalone Windows .exe applications. The exe files produced are totally standalone, no need for php dlls etc. The php code is encoded using the Turck MMCache Encode library so it's a perfect solution if you want to distribute your application while protecting your source code. The converter is also suitable for producing .exe files for windowed PHP applications (created using for example the WinBinder library). It's also good for making stand-alone PHP Socket servers/clients (using the php_sockets.dll extension). It's NOT really a compiler in the sense that it doesn't produce native machine code from PHP sources, but it works!
ZZEE PHPExe
http://www.zzee.com/phpexe/
ZZEE PHPExe compiles PHP, HTML, Javascript, Flash and other web files into Windows GUI exes. You can rapidly develop Windows GUI applications by employing the familiar PHP web paradigm. You can use the same code for online and Windows applications with little or no modification. It is a Commercial product.
phc-win
http://wiki.swiftlytilting.com/Phc-win
The PHP extension bcompiler is used to compile PHP script code into PHP bytecode. This bytecode can be included just like any php file as long as the bcompiler extension is loaded. Once all the bytecode files have been created, a modified Embeder is used to pack all of the project files into the program exe.
Requires
    php5ts.dll
    php_win32std.dll
    php_bcompiler.dll
    php-embed.ini
ExeOutput
http://www.exeoutput.com/
Commercial
WinBinder
http://winbinder.org/
PHPDesktop
http://code.google.com/p/phpdesktop/
PHP Desktop is an open source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop applications using web technologies such as PHP, HTML5, JavaScript & SQLite. This project is more than just a PHP to EXE compiler, it embeds a web-browser (Internet Explorer or Chrome embedded), a Mongoose web-server and a PHP interpreter. The development workflow you are used to remains the same, the step of turning an existing website into a desktop application is basically a matter of copying it to "www/" directory. Using SQLite database is optional, you could embed mysql/postgresql database in application's installer.
EDIT
Another option is to use
http://www.appcelerator.com/products/titanium-cross-platform-application-development/
an online compiler that can build executables for a number of different platforms, from a number of different languages including PHP

转载于:https://www.cnblogs.com/yisuo/p/6784096.html

你可能感兴趣的文章
SVN--从本地检出项目至服务器报错--禁止访问
查看>>
[LeetCode] Remove Invalid Parentheses
查看>>
3年外包码农近期烦心事
查看>>
如何用Fritzing实现元器件自定义接线图
查看>>
Educational Codeforces Round 37-E.Connected Components?题解
查看>>
4.13.2
查看>>
移动端图片处理
查看>>
使用FIDDER 抓包构建请求
查看>>
Linux误删文件挽救
查看>>
MongoDB整理笔记の体系架构
查看>>
HTML5 Web 客户端五种离线存储方式汇总
查看>>
石子博弈
查看>>
select Option(增加,删除,清空)
查看>>
centos7 mysql数据库的安装与使用
查看>>
四: 使用vue搭建网站前端页面
查看>>
四:DRF项目开发的准备
查看>>
Linux 进程管理
查看>>
【和孩子一起学编程】 python笔记--第五天
查看>>
java处理高并发高负载类网站的优化方法
查看>>
SpringMVC调用过程
查看>>