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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.