B4J Question Jetty library - is able to interpret php directives?

amorosik

Expert
Licensed User
I'm following the directions of the post Building web server with B4J with Jetty library
I would like to understand if the web server is also able to process pages containing php
If possible, how to indicate the path to the Php interpreter to use?
For example, the page:

B4X:
<!DOCTYPE html>
<html>
<head>
    <title><?php echo "Titolo della pagina"; ?></title>
</head>
<body>
    Sono le ore <?php echo date('H:i'); ?> del giorno <?php echo date('d/m/Y'); ?>.
</body>
</html>
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
is also able to process pages containing php
I guess No.

I found this on SO but i can´t answer how to adapt jetty

Imagine a php-script which, when it runs, output full HTML-Code.
You can call the php-interpreter on commandline starting the phpscript and capturing its output which you then can send over your server. You can use jshell to start the cli-interpreter.
Note that you need to have a working php-installation on your server which you can call by jShell.
 
Last edited:
Upvote 0
Top