I have to call some c++ functions in php files. how can i create an extention dll which will work with php.

Recommended Answers

All 5 Replies

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:

$Info = explode("\n", shell_exec(".\\progs\\program.exe"));

Will dump the output of program.exe in folder /progs/ to $Info using next line carriage as the exploder/seperator.

Hope that helps :)

there is a techniq to do this using ext_skel
thank u.

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?

there is a techniq to do this using ext_skel
thank u.

kindly clarify this ext_skel method
thank u

wow, didn't about that, nice, thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.