Invoking php from C++ code

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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?


Re: Invoking php from C++ code

Quoted text here. Click to load it

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.

-- /

Re: Invoking php from C++ code

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€
Mail: dvdmandt€
Quoted text here. Click to load it

Site Timeline