Jump to content

How can we call a function from within a C++ library in PHP


krups

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.