Re:system command
| From: | ron clark | Date: | Mon, 23 Aug 2004 20:13:03 +0000 |
| Subject: | Re:system command | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-194528@lists.php.net to get a copy of this message | ||
John Holmes wrote:
From: "ron clark" <clarkron@mail.armstrong.edu>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 5353I 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...