[56K warn] how do i Use matlab codes + C++ in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hanhao
Forum Newbie
Posts: 14
Joined: Mon May 22, 2006 10:58 am

[56K warn] how do i Use matlab codes + C++ in php

Post by hanhao »

how do i Use matlab written scripts and C++ written scripts in php?

i have the matlab and C++ script, they return values which i wish to display on my website with php

i have searched the forum but found nothing that solves this problem
the only way i know is to rewrite the whole matlab script and C++ into php form which is very tedious

is there anyway to do this?
User avatar
tasteslikepurple
Forum Commoner
Posts: 46
Joined: Thu Jan 26, 2006 3:38 am
Location: Bath, UK

Post by tasteslikepurple »

as far as the c++ goes, you could compile it then use the exec command to get php to make it run, i don't know about the matlab, to get that to run, you'll need your web server to have matlab installed and i'm guessing that in 99.99999999999999999999999% of the cases that's not going to happen!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

It it sends output to STDOUT it can be used in PHP. You just need to use the exec(), system() proc_open(), popen() etc functions.
hanhao
Forum Newbie
Posts: 14
Joined: Mon May 22, 2006 10:58 am

Post by hanhao »

is there anyway to make the webserver understand matlab language ?

i have physical and full access to the webserver so doing any configurations there should be ok
hanhao
Forum Newbie
Posts: 14
Joined: Mon May 22, 2006 10:58 am

Post by hanhao »

how about calling matlab for it?
it is required that the program be a shell or dos program?
matlab is not a shell or dos program. it's a windows program

Image
Post Reply