[prog] Calling a perl program from within PHP

Gareth Anderson somecsstudent at gmail.com
Sat Nov 13 13:50:13 EST 2004


Hi,

Quoting myself:

"
A quick read has me confused :).
I know the C version does do this, I guess I will have to try it when
I do get PHP access...

http://au.php.net/manual/en/function.system.php
"

A found a nicer page, and after re-reading I think its clear.

PHP documentation is very well organised!

"system() is just like the C version of the function in that it
executes the given command and outputs the result. "

passthru "This function should be used in place of exec() or system()
when the output from the Unix command is binary data which needs to be
passed directly back to the browser."

"exec() executes the given command, however it does not output anything."

And then there's this page which has them all listed:
http://au.php.net/manual/en/ref.exec.php

And proc_open and other commands whch are more complicated then I need....

So I believe exec() is not useful for what I'm doing.
system() should do it.
passthru() -- not designed for text data, hopefully system will work.

Regards,
Gareth


More information about the Programming mailing list