====== embed2 Sapi ====== This is a general purpose SAPI based originally on the (official) embed SAPI of [[php-guy>edink|Edin Kadribasic]]. It feature a lot of enhancement that let you use PHP (4/5) as a scripting engine for your application (Web based or not). It allow you to use the thread safe fonctionnality by the appropriate use of the API (ie: you can have multiple threads running PHP scripts at the same time). ===== Why ? ===== It's has the same purpose than embed but has a number of advantage other it: * More complete API so you don't have to understand Zend/Php internals to add the power of Php to your applications * No PHP related header inclusion in the header file * Separate global initialisation and request startup initialisation (allow multiple request in any thread) * Customisation of input/output callbacks ===== features ===== * Wrapping of usefull sapi call (startup, exec, eval, ...) * Simple thread safe Api (that use the PHP TS mechanism) * 2 type of initialisations: SAPI and CLI to allow the integration in any environnement * Support GPC and headers output * Control over php.ini directives and php.ini path * Very basic wrapping of SAPI mechanism (no overhead) * Wrapping of usefull PHP features (code highlight, syntax check) ===== Links ===== * For now you have to look at [[php_embed2.h]] for the documentation. * [[Exemples]] of use * [[:downloads|Download it]] FIXME Still work to do here