Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

JSLabs:
How to create a self extracting PHP script
Oct 09, 2007 @ 12:33:00

Justin Silverton has posted about a method he's found to create a self-extracting PHP script for your application:

PHP has a built-in command called __HALT_COMPILER__. This command Halts the execution of the compiler. This can be useful to embed data in PHP scripts. Below is an example of a self-extracting php script. When executed, a second php file will be extracted in the same directory called testscript1.php.

The post includes the code and a brief explaination of how it works.

tagged: selfextracting script extract example selfextracting script extract example

Link: