|
Posted by Tom on 12/11/06 18:34
On 10 Dec 2006 16:37:25 -0800, Sam wrote...
>
>hi,
>
>i've been trying to create a php script that writes some text to a
>file, then runs the perl interpreter on the file and shows the output.
>it works ok when valid perl is written to the file, so if i use 'print
>"hello world";' then it outputs 'hello world'. the problem is, if i
>enter invalid perl code, such as 'blahblahblah;', it outputs nothing.
>i'd like the php script to be able to get the error/output. does anyone
>know of a way to do this?
>
>thanks in advance.
>
There's a few options in PHP to run external commands. If you are trying to get
a value back from your Perl program you might need to use the "shell_exec"
function instead. I believe exec() just runs the program and may need to use the
other to capture the output into a variable or an array.
Tom
--
Newsguy - Express Accounts - 30 GB $9.95 / month
http://newsguy.com/overview.htm
[Back to original message]
|