krups Posted March 30, 2007 Share Posted March 30, 2007 How can we call a function from within a C++ library in PHP. Can we link to a C++ library by using dl()? Quote Link to comment https://forums.phpfreaks.com/topic/44929-how-can-we-call-a-function-from-within-a-c-library-in-php/ Share on other sites More sharing options...
cmgmyr Posted March 30, 2007 Share Posted March 30, 2007 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. *From: http://www.daniweb.com/techtalkforums/thread15662.html Quote Link to comment https://forums.phpfreaks.com/topic/44929-how-can-we-call-a-function-from-within-a-c-library-in-php/#findComment-218179 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.