T
T
toster_root2019-03-15 16:40:38
PHP
toster_root, 2019-03-15 16:40:38

How to make a desktop application in JS with a call to php code?

In general, the essence is this. I have a php script that works locally. I need to make a UI for this script now. And since everything is local, you need to make a desktop application. And since I am more or less familiar only with JS / Node.js, it will only work on js.
Therefore, the question is:
How (using what) can you make a desktop application with minimal effort, in which it will be called (more precisely, through which the php interpreter will be launched and the PHP script will be executed).
In fact, I need to make a form with a couple of fields and a button. And by clicking on the button, you need to somehow launch PHP.
How to do it? Any advice is welcome.
PS. After clicking on the button in the form, you need to accept the data from the form and somehow change the php. How can this be done too? For example, a person enters his name in the form and then this name goes to a certain place in the PHP script and then this code is executed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
VoidVolker, 2019-03-15
@VoidVolker

Well, since there is a form with a couple of fields and buttons, why not make a normal desktop application? For example WPF/WinForms. And so, you can use NWJS.

D
Dmitry Belyaev, 2019-03-15
@bingo347

electronjs.org - we write desktop on html+css+js
https://nodejs.org/dist/latest-v10.x/docs/api/chil... or https://nodejs.org/dist/latest-v10 .x/docs/api/chil... - to run a php script from node/electron
, form data can be passed to php via environment variables, process arguments or stdin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question