Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. PHP request from qt
Forum Updated to NodeBB v4.3 + New Features

PHP request from qt

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    venkatesh.rajavetrivel
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AcerExtensa
      wrote on last edited by
      #2

      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");
      @

      God is Real unless explicitly declared as Integer.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved