是否可以在Qt(Symbian)中嵌入PHP?

问题描述:

Since QT SDK for symbian does not support MySQL driver (spent 5 days trying to create one with no success), is it possible to embed php code in c++/qt ? I.E. I would be able to put in my symbian app php code that will connect to remote db and insert some data into tables ...

$mysqli = new mysqli("localhost", "username", "pass", "db");            
if ($mysqli->connect_errno)
{                                                                   
echo "Failed to connect: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}

And after that some insert statement ...

Do you know if it's feasible ?

It is obviously bad by design - if you don't want to store data locally (you can use SQLite 3 driver for Symbian), you shouldn't have local PHP server on phone, but you should rather have remote PHP server where the database resides and create API to communicate with it from your phone.