John Holmes wrote:

From: "ron clark" <[EMAIL PROTECTED]>

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...


Thanks John. Was a simple fix. Turn output buffering on to prevent the output of the system command going to the browser. Capture the output in the $output variable then ob_clean to empty the output buffer before printing the the desired message.

--
Ron Clark
System Administrator/Web Coordinator
Armstrong Atlantic State University
11935 Abercorn Street Savannah, Ga 31419
Phone: 912 961 3234
Fax: 912 927 5353


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to