Open omerfeyyaz opened 7 years ago
You could execute a PHP Script by just calling the Webserver where php is running (see http://stackoverflow.com/questions/655620/how-can-i-execute-a-php-script-from-java).
Nanohttpd by itself is just a simple Webserver, that has nothing to do with Java Swing, CSS, Javascript or php and MySQL.
MySQL: Just install and run a Server, access the Database through traditional means (SQL Clients), independent of the language.
CSS, JavaScript, HTML: Just serve the JavaScript files with a Webserver (Like Nanohttpd)
PHP: You can expose the default Webserver aswell as the Java One or use Nginx as a reverse proxy for both php and java swing ( https://www.nginx.com/resources/admin-guide/reverse-proxy/ ) or you could implement a PHP parsing module with Resin ( www.caucho.com/resin-3.1/doc/overview.xtp ),
But all of these are unrelated to nanohttp itself. You might want to rethink your question based on this input or close it, if that Question is solved already.
Bjoern pretty much said everything. You cannot run a PHP CMS inside NanoHTTPD, unless you want to run the scripts through a Java PHP interpreter, which may or may not exist.
Java swing doesn't make sense unless you want to run a Java Applet in the frontend, which is a VERY bad idea for more reasons than I can state.
Thanks to you i found the method like this on the user's computer 1-) Install and set Apache Http Server 2-) PHP setup and setup 3-) Set and set MySql
As I said in the title I want to do CMS with php + java swing + css + javascript but how do I handle PHP and Mysql work? I also put the java version of the cef browser and show the CMS pages in it.