Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 12th, 2005, 8:40 AM   #1
ktsirig
Programmer
 
Join Date: Oct 2005
Posts: 54
Rep Power: 4 ktsirig is on a distinguished road
system commands/ save results

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
ktsirig is offline   Reply With Quote
Old Oct 27th, 2005, 2:10 PM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
http://us3.php.net/popen
__________________

tempest is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:25 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC