amorosik Expert Licensed User Longtime User Jun 29, 2023 #1 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: Copy <!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: Jun 29, 2023
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: Copy <!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>
DonManfred Expert Licensed User Longtime User Jun 29, 2023 #2 amorosik said: is also able to process pages containing php Click to expand... I guess No. I found this on SO but i can´t answer how to adapt jetty jetty server run php code I want to configure so that jetty runs PHP files, but have been unsuccessful so far. I have Jetty WTP tools installed in my Eclipse IDE. When I start up the Jetty server. I got the exception: java... stackoverflow.com 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: Jun 29, 2023 Upvote 0
amorosik said: is also able to process pages containing php Click to expand... I guess No. I found this on SO but i can´t answer how to adapt jetty jetty server run php code I want to configure so that jetty runs PHP files, but have been unsuccessful so far. I have Jetty WTP tools installed in my Eclipse IDE. When I start up the Jetty server. I got the exception: java... stackoverflow.com 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.
Erel B4X founder Staff member Licensed User Longtime User Jun 29, 2023 #3 That's true. Jetty cannot run PHP scripts. Upvote 0