Computing.Net > Forums > Programming > PHP. Send Unix command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PHP. Send Unix command

Reply to Message Icon

Name: rhursto
Date: November 16, 2006 at 11:41:34 Pacific
OS: Solaris 10
CPU/Ram: ultraSPARC III/1GB
Product: Sun/v210
Comment:

Hi,
I'm new to php so this may be a simple answer.
I want to send a command from a php script to a list of servers (from a file stored in the apache docs root).
I have got as far as reading the file line by line and printing the servers line by line, but I can't get the 'shell_exec' command to send the command to each server. Probs just simple syntax error but I'm running out of ideas!!
I'm trying it like this at the mo...

$output = shell_exec("rsh $servername df -k");
echo $output;

Cheers.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Batch file help Web Part



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: PHP. Send Unix command

HOW CAN I RUN UNIX COMMANDS in VB6? www.computing.net/answers/programming/how-can-i-run-unix-commands-in-vb6/14264.html

Unix commands in Command prompt? www.computing.net/answers/programming/unix-commands-in-command-prompt/15282.html

call unix commands through program www.computing.net/answers/programming/call-unix-commands-through-program/9062.html