weixin_33739646 2015-06-19 08:24 采纳率: 0%
浏览 3

jQuery load()实时结果?

I have a simple page that when the submit button is clicked I load a page using load()

eg:

$("#res").load("do.php");

do.php contains a few simple command that are run and return the results to screen.

If I run do.php directly in my browser I get the results displayed on screen in real time as they script runs then and gets the results back.

However when called from another page using load() I only get the results page once do.php has completely finished.

Is there any way to call do.php from another page and have its results returned live ?

do.php contains simple commands similar to:

<?php
$cmd = 'ping 127.0.0.1';

while (@ ob_end_flush());

$proc = popen($cmd, 'r');
echo '<pre>';
while (!feof($proc))
{
    echo fread($proc, 4096);
    @ flush();
}
echo '</pre>';
?>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制