Generating Formatted PHP Source Code in HTML

Since PHP LSAPI version 4.3, PHP LSAPI has been capable of generating formatted PHP source code in HTML, allowing users to view the source code for these files through a web browser.

Command line option

You can set LSPHP to generate source code using the command line option -s. For example:

$SERVER_ROOT/fcgi-bin/lsphp5 -s

Setting it up within the WebAdmin console

If you add -s at the end of the Command setting in the WebAdmin Console under Configuration > External App > your_external_application > Command, that external application will now generate PHP source code in HTML for the files it reads. A script handler can then be created under Configuration > Script Handler pointing to that external application. This will direct all files with a Suffix defined in that script handler (phpsc, for example) to the external application that will generate their source code.

 
litespeed_wiki/php/generate-source-code-with-lsapi.txt · Last modified: 2018/09/18 21:16 by Michael Alegre