Re: system command

From: Date: Mon, 23 Aug 2004 20:00:31 +0000
Subject: Re: system command
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-194524@lists.php.net to get a copy of this message
From: "ron clark" <clarkron@mail.armstrong.edu>
I an trying to add virus scanning to the file upload section of our portal using uvscan. The virus scanning is working properly using a system call , but I am having problems with formatting the output. I need to check the return value and if it is not a 0, I want to create a custom message. The problem is, when using system the output of the call is flushed to the browser before I can write the custom message so I have the uvscan message and then my custom message.
You can use output_buffering to capture the output, or use a different method to make the call, i.e. backticks or exec(), which allow you to capture the output before it's displayed. ---John Holmes...

« previous php.general (#194524) next »