-6

Possible Duplicate:
Call a C program from php and read program output

How can I run a C/Java/Python/etc. program when using PHP?

1

2 Answers 2

1

I think you are looking for PHPs exec function:

exec('myapp');
Sign up to request clarification or add additional context in comments.

1 Comment

sorry,i am fool,i still cant solve my proplem
0

Use popen() function. This will grant you access to stdout or stdin, but only one of them.

So, python application:

$handle = popen('python /home/user/Documents/somefile.py', 'r');
var_dump(fread($handle));
pclose($handle);

But if you need to use both stdin and stdout - you should take a look at proc_open().

8 Comments

sorry,i am really fool,i still can't solve my proplem :(
and what are you trying to do?
faster,faster...people can visit my website more faster,can you give me some suggestions
tell me what are you trying to get and i shall give you some suggestions ;)
i want some methods to let my website faster,can you help me?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.