Re: How to get exec() to display output from UNIX Shell Environemnt?

From: Date: Tue, 05 Aug 2003 21:40:46 +0000
Subject: Re: How to get exec() to display output from UNIX Shell Environemnt?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158355@lists.php.net to get a copy of this message
On Tuesday 05 August 2003 05:20 pm, Scott Fletcher wrote: > Hi! > > How do I get the php function exec() to spit out the data from the Unix > Shell Environment onto the webpage? I mean, I can create a script in bash > shell environment using the terminal on the Unix machine and it would spit > out the background information from the O/S along with the shell script. I > can do that with cURL. So, for the PHP, I would need to use exec() but it > only executed the script without a problem but no shell output from the > unix shell onto the webpage. How can I do that? It is very helpful for > troubleshooting purpose. Use the second argument of exec(), or use system(), depending on your need. Read The Manual for exec() and system(). It's pretty clear. RDB -- ------------------------------------------------- /"\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ ------------------------------------------------- Have you been used by Microsoft today? Choose your life. Choose freedom. Choose LINUX. -------------------------------------------------

« previous php.general (#158355) next »