943,981 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 17434
  • PHP RSS
Dec 16th, 2004
0

How can i call c++ functions in php?

Expand Post »
I have to call some c++ functions in php files. how can i create an extention dll which will work with php.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vrgopakumar is offline Offline
2 posts
since Dec 2004
Dec 28th, 2004
0

Re: How can i call c++ functions in php?

If you are using php on a linux machine you can use the system function.

http://uk2.php.net/manual/en/function.system.php

Or if you are using Windows machines, you can use shell_exec function.

http://uk2.php.net/shell_exec

example:
[PHP]$Info = explode("\n", shell_exec(".\\progs\\program.exe"));
[/PHP]
Will dump the output of program.exe in folder /progs/ to $Info using next line carriage as the exploder/seperator.

Hope that helps
Reputation Points: 12
Solved Threads: 5
Junior Poster
ReDuX is offline Offline
127 posts
since Sep 2004
Dec 28th, 2004
0

Re: How can i call c++ functions in php?

there is a techniq to do this using ext_skel
thank u.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vrgopakumar is offline Offline
2 posts
since Dec 2004
Mar 30th, 2010
0
Re: How can i call c++ functions in php?
is this like runing a c++ program from php...? is tht possible....???
can i a run a different program all together.... thru a php fuction.. run a c++ program?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tinudeshmukh is offline Offline
3 posts
since Mar 2010
Apr 13th, 2010
0
Re: How can i call c++ functions in php?
there is a techniq to do this using ext_skel
thank u.
kindly clarify this ext_skel method
thank u
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tinudeshmukh is offline Offline
3 posts
since Mar 2010
Apr 13th, 2010
0
Re: How can i call c++ functions in php?
wow, didn't about that, nice, thanks
Reputation Points: 8
Solved Threads: 15
Junior Poster
theighost is offline Offline
103 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Use of regex engine in a browser?
Next Thread in PHP Forum Timeline: PHP problem with T-STRING





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC