PHP request from qt
General and Desktop
3
Posts
3
Posters
2.7k
Views
1
Watching
-
Hi everyone.
Can anyone please let me know that how to request PHP script from Qt qml and get back the reply to show on the console?
I had even tried it with ajax but It could not detect the php page as website but normal text.
Please provide any suggestions.
-
You mean, you need to execute php scriptfile locally or remote but without php webserver?
You can't do that! PHP is an script and it needs interpreter! You can use php-cli binary to do this locally.
Something like this:
@
QProcess::execute("php-cli", QStringList() << "your-script.php");
@