| | |
How can i call c++ functions in php?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
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
I'm pink, therefore, im spam.
http://www.vivaci.net - Quality Webhosting
http://gaming.vivaci.net - FAST UK Gaming servers
http://www.getsigned.org - Free Image Uploads
http://www.vivaci.net - Quality Webhosting
http://gaming.vivaci.net - FAST UK Gaming servers
http://www.getsigned.org - Free Image Uploads
![]() |
Similar Threads
- [how to]Call functions of one Class from another class (C#)
- Are direct system call functions the fastest way to read/write data on Linux? (C++)
- Call a specific PHP function with AJAX? (JavaScript / DHTML / AJAX)
- Can two software which both write in Visual C++ call each other functions..?? (C++)
- how to call these functions? (C#)
- Question about Functions (C++)
Other Threads in the PHP Forum
- Previous Thread: how to make member expire after so many days with php script
- Next Thread: Slashes before Double Quote marks
| Thread Tools | Search this Thread |
ajax apache api array arrays beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external file files folder form forms forum function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert integration ip java javascript joomla limit link login loop mail malfunction menu method mlm multiple mysql neutrality oop paypal pdf php phpmysql play problem query question radio random recursion regex remote root script search select server sessions sms soap source space sql syntax system table tutorial update upload url validator variable video web xml youtube





