Put in example on how to format an output string during flush.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9313 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a1a31f0760
commit
a28c62f3e9
@ -105,8 +105,13 @@ function submit_request($req, $skipVerify, $opts_array){
|
||||
// Strip HTML tags from output
|
||||
if ($tmp = trim(strip_tags($str))) {
|
||||
// Format the output based on what was given for $flush_format
|
||||
echo $tmp . '<br/>';
|
||||
flush();
|
||||
if ($flush_format == "TDB") {
|
||||
format_TBD($tmp);
|
||||
} else {
|
||||
// Print out output by default
|
||||
echo $tmp . '<br/>';
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -298,4 +303,16 @@ function logout() {
|
||||
$_SESSION=array();
|
||||
session_destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a given string and echo it back to the browser
|
||||
*
|
||||
* @param $str String
|
||||
* @return Nothing
|
||||
*/
|
||||
function format_TBD($str) {
|
||||
// Format a given string however you want it
|
||||
echo $tmp . '<br/>';
|
||||
flush();
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user