Jump to content

Search the Community

Showing results for tags 'ob_flush'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I am having a bit of an issue with ob_flush in particular. What's happening is I am using jquery UI to create a tabbed div. With in one of the DIV's I print out the live output on an apache ant command using ob_flush, however that also seems to flush jquery as well which breaks all of my formating. Once the ant command is complete, the formatting returns to normal. Does any one know any way around this issue? I am assuming that jquery is being flushed as well. Here is the page I am running, the live output of ant is displaying like I would like but like I said the formatting get's flushed <html> <head> <link rel="stylesheet" href="css/jquery-ui.css"> <link rel="stylesheet" type="text/css" href="css/style.css"/> <script src="scripts/jquery-ui.min.js"></script> <script src="scripts/jquery-ui.js"></script> <script language="javascript"> function clearform() { document.getElementById("json").value=""; } </script> <script> $(function() { $( "#tabs" ).tabs(); }); </script> <title>Add Manual Event Data</title> <?php if (empty($_POST["comment"])) { $comment = ""; } else { $cleaned = test_input($_POST["comment"]); $comment = ($_POST["comment"]); } function test_input($data) { $data = trim($data); $data = addslashes($data); return $data; } ?> </head> <body> <div id="tabs" class="body-check"> <ul> <li><a href="#tabs-1">Event By String</a></li> <li><a href="#tabs-2">Add Event Form</a></li> </ul> <div id="tabs-1"> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> <center><h1>Add Event Data:</h1></center> <p> <textarea id="json" name="comment"><?php echo $comment;?></textarea> </p> <input type="submit" name="submit" value="Submit"> </form> <?php if (isset($cleaned)){ echo '<div id="ant">'; $json_arg = escapeshellarg($cleaned); $proc = popen("sudo /var/www/html/scripts/set_vars.sh $json_arg 2>&1", 'r'); echo '<pre>'; while (!feof($proc)){ echo fread($proc, 1024); @ob_flush(); @flush(); } echo '</pre>'; echo '</div>'; echo '<script>'; echo 'setTimeout( function ( ) { alert( "Event Added!" ); }, 2000 );'; echo 'clearform();'; echo '</script>'; } ?> </div> <div id="tabs-2"> <h1>Hello!</h2> </div> </div> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.