Page 1 of 1

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

Posted: Mon May 22, 2006 11:05 am
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?

Posted: Mon May 22, 2006 11:56 am
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!

Posted: Mon May 22, 2006 12:20 pm
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.

Posted: Mon May 22, 2006 10:00 pm
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

Posted: Wed May 24, 2006 12:04 am
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