How to execute a shell script and diplay the output

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
guarriman
Forum Commoner
Posts: 44
Joined: Thu Nov 03, 2005 4:11 am

How to execute a shell script and diplay the output

Post by guarriman »

Hi.

I'm trying to execute a shell script with PHP, and display the output through my website.

Is it possible? Thank you very much.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Code: Select all

echo shell_exec('/path/to/executable/script');

// or..

echo `/path/to/executable/script`;
Post Reply