PHP / C++ Integration

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
toravy
Forum Newbie
Posts: 3
Joined: Fri Oct 14, 2005 3:59 am

PHP / C++ Integration

Post by toravy »

Hi,
I have to integrate C++ code with PHP. Anybody worked before in this help me. Its very urgent.

Thanks for your help in advance.
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Post by thomas777neo »

What does your c++ code do? And why the integration selection?
toravy
Forum Newbie
Posts: 3
Joined: Fri Oct 14, 2005 3:59 am

PHP / C++ Integration

Post by toravy »

Hi thomas,
Thanks for reply. C++ code contains the parser. So i have to call the C++ file in php and pass the parameters like <inputfile> <input-seprator> <outputfile> <output-seprator> col1 col2 co3 ....

Thanks for your help in advance,
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Post by thomas777neo »

What does your code do, its objective?
User avatar
phpdevuk
Forum Contributor
Posts: 220
Joined: Mon Jul 04, 2005 5:31 am
Location: UK
Contact:

Post by phpdevuk »

sounds like its reading some kind of datafile in, possibley some kind of import?
toravy
Forum Newbie
Posts: 3
Joined: Fri Oct 14, 2005 3:59 am

PHP / C++ Integration

Post by toravy »

Hi,
Thaks for your replys,
The C++ code file is used to read the log file. For that i have to call the C++ Code file and pass the parameters like <inputfile> <input-seprator> <outputfile> <output-seprator> col1 col2 co3 ....
Please send me some example code to do like this if its possible, then its very easier for to do.

Thanks for your help in advance,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

You make it sound as if you are mixing actual c++ source code with php source code. heh

That's not what you are doing, right?

If it's the executable, run exec()
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

Sami wrote: If it's the executable, run exec()
Exactly! However, it doesn't sound like he knows how to code at all. Otherwise, he would've realized that
the behaviour he is describing can be accomplished in PHP without the use of this C++ file.
Post Reply