?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


?
?system commands/ save results
Author:?kostas?(---.dialup.eexi.gr)
Date:???10-12-05 05:07

Hi all!
I call a system program through PHP, using the system commands provided by PHP (like system, exec etc)

Q1: Is there a way (I think using the return values) to make sure that the program has run? I mean, not take the data from the program if the program has encountered any kind of internal error and didn't ran correctly.

Q2: How can I pass the data that I take from the program to a string, in order to handle them and present them to the user the way I want?

The command I use is something like:

$command = shell_exec ('program_name argum1 argum2');

argum1 and argum2 are arguments that I feed the program with.
Will the '> tmp_file' store the data I take as result from the program into the tmp_file or must I use something else?
Thanx

?Topics Author? Date
?system commands/ save results??new
kostas 10-12-05 05:07?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > Hi all! > I call a system program through PHP, using the system > commands provided by PHP (like system, exec etc) > > Q1: Is there a way (I think using the return values) to make > sure that the program has run? I mean, not take the data from > the program if the program has encountered any kind of > internal error and didn't ran correctly. > > Q2: How can I pass the data that I take from the program to a > string, in order to handle them and present them to the user > the way I want? > > The command I use is something like: > > $command = shell_exec ('program_name argum1 argum2'); > > argum1 and argum2 are arguments that I feed the program with. > Will the '> tmp_file' store the data I take as result from > the program into the tmp_file or must I use something else? > Thanx ">??

Provided By
Phorum