PHP: possible to compile a web-application into a windows application?
I have developed a PHP web application, but a client insists on a real Windows application, since he doesn't like running the software inside a browser.
Are there any solutions for this, any compilers to turn a web 开发者_JAVA技巧project into a Windows exe ?
I have looked at Phc-Win , but that seems more suited for small command line utils, not for entire web-applications...
UPDATE:
just found this myself, both look quite promising...
http://www.zzee.com/phpexe/
http://www.exeoutput.com/index.php
There's no tool for this, short of a simple wrapper app that embeds a browser inside an otherwise normal application window. Your PHP app would have to be completely re-written to include ALL of the overhead code necessary to build a GUI - basically all the 'display' stuff that a browser does automatically, would have to added to your app.
Well some of you did not google good enough:
http://www.appcelerator.com/products/titanium-cross-platform-application-development/
Supports most of the "web-languages" to write native Applications.
Tutorial Reference for Appcelerator: http://appceleratortitanium.com/tutorials/3-appcelerator-titanium-tutorial-beginners.html
Quote:
"Q: What languages can I use to make desktop apps?
A: Javascript, PHP, Python, Ruby, HTML, HTML5, and CSS."
Not exactly what you are looking for: http://www.roadsend.co/home/index.php?pageID=compiler
You may look into "HipHop" (made by Facebook): Converts PHP to compileable C++-
There's a tool for this. :-) I never used it but you can try this: Winbinder.
It is simple to compile your PHP source code into an executable. Facebook released a compiler for PHP in early-2010, called HipHop, which aims to create C++. You could then compile this code, for example using gcc, to machine-code.
The more difficult point for a complex Web-App like yours is the user interface. When compiling the way I described above, the application can be run from command line - this might work for simple tasks, but not, if your application returns HTML.
One possibility to solve this problem is PHP-GTK. PHP-GTK is a API for GTK (the graphical user interface used by Linux Ubuntu by default), written in PHP. Using this solution would have to read some documentation about this API, and you would need to rewrite some parts of your program, but it would probably be the most beautiful solution, because it would create a "native" experience.
Another possible solution could involve Adobe AIR, which lets your create programs for the desktop, using HTML, CSS and JavaScript, but I don't know if and how this would work together with your compiled PHP.
Please also note that it isn't absolutely necessary to compile your PHP for it to run on the client's computer; You could also ship the PHP-interperter right with your (uncompiled) PHP-script. Of course, compiling brings benefits, such as faster execution of the program.
-- André
精彩评论