i'm wondering about this possibility. Is it possible to make our code written in code and string compile and make it become Executable and can operate without the use of server such as Apache.
The OS 开发者_JS百科environment will be Windows family.
I've never tried it, but you could take a look at PHC. It appears to be able to do just that.
Also take a look at Hip-Hop by Facebook. Looks good (and more recent).
Edit: And for more PHP Compilers, see Wikipedia
There are some application which compress your application, a web browser and PHP into an executable file. This way it works like an application.
If you want write an application in windows using PHP you can try PHP windows bindings http://winbinder.org/ . It looks promising
Also I have found two windows compilers for PHP while googling (I did not use them).
- http://www.bambalam.se/bamcompile/
- http://www.phpcompiler.org/
The existing answers cover the bases fairly well for possible ways to compile your php code into an executable. That said, you may not have to go to those lengths, based on your question.
If all you are looking for is a way to execute php scripts in Windows away from an Apache server, then all you need to do is install php to your Windows machine. Then you can run any php script from the command-line by simply typing > php script.php
You can download the Windows installation package for this from http://windows.php.net/download/
精彩评论