By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,722 Members | 1,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,722 IT Pros & Developers. It's quick & easy.

Invoking php from C++ code

P: n/a
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.
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Michal O" <mi*****@gmail.com> wrote in message
news:46**************************@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/
Jul 17 '05 #2

P: n/a
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" <mi*****@gmail.com> skrev i meddelandet
news:46**************************@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.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.