December 28, 2006
这两天给老婆写了个程序, 可以给她的工作增加点方便性, 本来想用C++的, 发现C++中要用正则表达式还是比较麻烦的, 可我又不会用perl和python, 而且这两种软件要编译成exe的文件也很麻烦, 所以想想还是用PHP算了, 这个语言还比较熟悉些。用php来执行程序, 也需要几个文件, php.exe, php4ts.dll。 然后还要建一个cmd的命令行文件。 想想现在的科技发展什么都有, PHP直接编译成exe运行的软件有没有, 秉承“知之为知之, 不知google之”的原则, google就有了上面说的这个了。用来试试了还真的不错, 下面是一些特点(来源网上)
特点:
1、使用 Turck MMCache Encode library 对 php 代码进行 encode
2、自带了一个UPX命令行工具,能够压缩输出的 exe 文件
3、目前支持 php 4.4.2 版本,对 php 5 的支持也在计划中
4、已经捆绑了下列模块:
Turck MMCache
bcmath
calendar
com
ctype
ftp
mysql
odbc
pcre
win32std
xml
zlib
5、源代码开放,免费使用
官方主页:
http://www.bambalam.se/bamcompile/
程序及源码下载(最新版本为 1.21):
Download Bamcompile 1.21 (win32) zip
Download Bamcompile 1.21 Source zip
下面是网站的部分摘录
Usage:
bamcompile [-options] infile.php [outfile.exe]
bamcompile [-options] project_directory mainfile.php [outfile.exe]
bamcompile projectfile.bcp
Options:
-w Hide console window for windowed applications
-c Compress output exe (using UPX)
-d Do not encode PHP files
-e:extension.dll Embed and use PHP extension
-i:icon.ico Add icon to exe
Revision history:
1.21 2006-08-28:
Fixed an issue with apps using extensions crashing if php4ts.dll was in the system path
1.2 2006-08-24:
Added an extension loader - extension dll’s can now be embedded
Added a project file feature
Added support for exe icons
UPX is now embedded, it’s no longer needed in the system path
Added some examples of PHP applications
Upgraded to PHP 4.4.4
Fixed some compatibility issues when running on a system with PHP installed
lots of minor bugfixes
1.1 2006-06-09:
Added the php_sockets extension to the static build
+ minor bugfixes
附录:
除了这个工具还有下面的一些, 我没有用过。
Roadsend Compiler for PHP
Phalanger
PriadoBlender
BinaryPHP
您喜欢本文吗?即刻订阅"偶爱偶家",精彩文章不再错过!现在就给我们留个话吗?
Random Posts


One response to "将php程序编译成exe程序(Bambalam PHP EXE Compiler/Embedder)"
http://www.6inchboot.com/
UGG boots;cheap UGG;UGG classic
[Reply]