Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
PHP request from qt
venkatesh.rajavetrivel last edited by
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.
AcerExtensa last edited by
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");
ChrisW67 last edited by
If the remote server is returning the PHP source code of a PHP page rather than the result of running the PHP then the remote server is incorrectly configured and this is not a Qt problem.