[Solved]How to call a PHP script on localhost using Qt?
I am developing an app which broadly does the following:
1. Accepts from the user an html file
2. Runs a php script to make changes to the html
3. Returns the changed html back to the user to view
How can I call the PHP script in Qt? I am using Apache running on my localhost
I would call the PHP command line tool. See the wiki article [developer.qt.nokia.com] for an example. It calls the applescript interpreter on OS X, but it’s basically the same for the PHP command line tool.
you make a http request to your localhost http server(in your case apache server)
more info you can find here: Qt http request [wiki.forum.nokia.com]
for example you have the following php pahe in your htdocs directory: test.php
- // test.php
- echo("hello world");
you just access your page : http://localhost/test.php