This is a discussion on Invoking php from C++ code within the PHP Language forums, part of the PHP Programming Forums category; Hi. I have to write a C++ code that invokes a set of SQL statements (inserts, updates, selects etc.), according ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi.
I have to write a C++ code that invokes a set of SQL statements (inserts, updates, selects etc.), according to the system administrator's directives. I thought of writing the directives as a php script. Can I execute php functions from a C++ code? The php script writer should be able to access informaion from the C++ program, and the C++ program should receive php execution results. Is this possible? How? Thanks. |
|
|||
|
"Michal O" <michalo@gmail.com> wrote in message
news:4612f134.0409260126.4295e553@posting.google.c om... > Hi. > I have to write a C++ code that invokes a set of SQL statements > (inserts, updates, selects etc.), > according to the system administrator's directives. > > I thought of writing the directives as a php script. > > Can I execute php functions from a C++ code? > The php script writer should be able to access informaion from the C++ program, > and the C++ program should receive php execution results. > Is this possible? > How? in theory you could use SAPI (server api) to create from your C program enviroment that minics web server to php. But I do not think this would be worthwile to do all that just to execute a few queries. rush -- http://www.templatetamer.com/ |
|
|||
|
Possible, yes.. You'd just create a new SAPI.. Which doesn't seem tooo hard
if you look at some of the sources.. However, I truly doubt it would be worth the trouble.. I also suppose you could run the cgi exe and pass the data needed by the script as cgi parameters or whatever they are called... But to be honest, I think it'll be easier to just stick to C++.. -- // DvDmanDT MSN: dvdmandt€hotmail.com Mail: dvdmandt€telia.com "Michal O" <michalo@gmail.com> skrev i meddelandet news:4612f134.0409260126.4295e553@posting.google.c om... > Hi. > I have to write a C++ code that invokes a set of SQL statements > (inserts, updates, selects etc.), > according to the system administrator's directives. > > I thought of writing the directives as a php script. > > Can I execute php functions from a C++ code? > The php script writer should be able to access informaion from the C++ program, > and the C++ program should receive php execution results. > Is this possible? > How? > > Thanks. |