• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ob_flush函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ob_flush函数的典型用法代码示例。如果您正苦于以下问题:PHP ob_flush函数的具体用法?PHP ob_flush怎么用?PHP ob_flush使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ob_flush函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: after_output

 protected function after_output()
 {
     # flush once, because we're nice
     if (ob_get_length()) {
         ob_flush();
     }
 }
开发者ID:rene-hermenau,项目名称:query-monitor,代码行数:7,代码来源:AJAX.php


示例2: action_messages

 public function action_messages($route_id, &$data, $args)
 {
     $uimessages = $_MIDCOM->serviceloader->load('uimessages');
     if (!$uimessages->supports('comet') || !$uimessages->can_view()) {
         return;
     }
     $type = null;
     $name = null;
     if (isset($_MIDCOM->dispatcher->get["cometType"])) {
         $type = $_MIDCOM->dispatcher->get["cometType"];
     }
     if (isset($_MIDCOM->dispatcher->get["cometName"])) {
         $name = $_MIDCOM->dispatcher->get["cometName"];
     }
     if ($type == null && $name == null) {
         throw new midcom_exception_notfound("No comet name or type defined");
     }
     if (ob_get_level() == 0) {
         ob_start();
     }
     while (true) {
         $messages = '';
         if ($uimessages->has_messages()) {
             $messages = $uimessages->render_as('comet');
         } else {
             $uimessages->add(array('title' => 'Otsikko from comet', 'message' => 'viesti from comet...'));
         }
         midcom_core_helpers_comet::pushdata($messages, $type, $name);
         ob_flush();
         flush();
         sleep(5);
     }
     // $data['messages'] = $messages;
 }
开发者ID:abbra,项目名称:midcom,代码行数:34,代码来源:comet.php


示例3: add_sites

function add_sites($array)
{
    global $db, $spider;
    foreach ($array as $value) {
        $row = $db->get_one("select * from ve123_links where url='" . $value . "'");
        if (empty($row)) {
            echo $value . "<br>";
            $spider->url($value);
            $title = $spider->title;
            $fulltxt = $spider->fulltxt(800);
            $keywords = $spider->keywords;
            $description = $spider->description;
            $pagesize = $spider->pagesize;
            $htmlcode = $spider->htmlcode;
            $array = array('url' => $value, 'title' => $title, 'fulltxt' => $fulltxt, 'pagesize' => $pagesize, 'keywords' => $keywords, 'description' => $description, 'addtime' => time(), 'updatetime' => time());
            //echo $fulltxt;
            $db->insert("ve123_links", $array);
            file_put_contents(PATH . "k/www/" . base64_encode($value), $htmlcode);
            //echo $htmlcode;
        } else {
            echo "已存在:" . $value . "<br>";
        }
        ob_flush();
        flush();
        sleep(1);
    }
}
开发者ID:tanny2015,项目名称:DataStructure,代码行数:27,代码来源:find_sites.php


示例4: redirect

 /**
  * Redirige a una url
  * @param	mixed	$url	Url o arreglo que especifica prefijo, controlador y accion
  */
 public static function redirect($url = null)
 {
     ob_start();
     header('Location:' . \Supernova\Route::generateUrl($url));
     ob_flush();
     die;
 }
开发者ID:enspdf,项目名称:SupernovaPHP,代码行数:11,代码来源:Controller.php


示例5: buffer_flush

function buffer_flush()
{
    echo '<!-- -->';
    // ?
    ob_flush();
    flush();
}
开发者ID:Netping,项目名称:DKSF_69_system,代码行数:7,代码来源:index.php


示例6: postNote

 /**
  * post Note Action
  *
  * @param string $httpData->appUid (optional, if it is not passed try use $_SESSION['APPLICATION'])
  * @return array containg the case notes
  */
 function postNote($httpData)
 {
     require_once "classes/model/AppNotes.php";
     //extract(getExtJSParams());
     if (isset($httpData->appUid) && trim($httpData->appUid) != "") {
         $appUid = $httpData->appUid;
     } else {
         $appUid = $_SESSION['APPLICATION'];
     }
     if (!isset($appUid)) {
         throw new Exception('Can\'t resolve the Apllication ID for this request.');
     }
     $usrUid = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : "";
     $noteContent = addslashes($httpData->noteText);
     //Disabling the controller response because we handle a special behavior
     $this->setSendResponse(false);
     //Add note case
     $appNote = new AppNotes();
     $response = $appNote->addCaseNote($appUid, $usrUid, $noteContent, intval($httpData->swSendMail));
     //Send the response to client
     @ini_set("implicit_flush", 1);
     ob_start();
     echo G::json_encode($response);
     @ob_flush();
     @flush();
     @ob_end_flush();
     ob_implicit_flush(1);
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:34,代码来源:appProxy.php


示例7: flushPause

function flushPause($pause = 0)
{
    echo ob_get_clean();
    @ob_flush();
    flush();
    usleep($pause * 1000000);
}
开发者ID:sebmarkbage,项目名称:mootools-core,代码行数:7,代码来源:DOMReady.php


示例8: index_f

 function index_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         error($this->lang["download_error"], $this->url());
     }
     $rs = $this->upfile_m->get_one($id);
     //执行下载操作
     if (!file_exists(ROOT . $rs["filename"]) || !$rs["filename"] || !is_file(ROOT . $rs["filename"])) {
         error($this->lang["download_empty"], $this->url());
     }
     $filesize = filesize(ROOT . $rs["filename"]);
     if (!$rs["title"]) {
         $rs["title"] = $rs["filename"];
     }
     $tmpname = str_replace("." . $rs["ftype"], "", $rs["title"]);
     $tmpname = $tmpname . "." . $rs["ftype"];
     ob_end_clean();
     header("Date: " . gmdate("D, d M Y H:i:s", $rs["postdate"]) . " GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s", $rs["postdate"]) . " GMT");
     header("Content-Encoding: none");
     header("Content-Disposition: attachment; filename=" . rawurlencode($tmpname));
     header("Content-Length: " . $filesize);
     header("Accept-Ranges: bytes");
     readfile($rs["filename"]);
     flush();
     ob_flush();
 }
开发者ID:ahmatjan,项目名称:yida,代码行数:28,代码来源:download.php


示例9: show_captcha

 public function show_captcha()
 {
     if (session_id() == "") {
         session_name("CAKEPHP");
         session_start();
     }
     $vendor_path = App::path('Vendor');
     $path = $vendor_path[0] . 'captcha';
     $imgname = 'bg.jpg';
     $imgpath = $path . DS . 'images' . DS . $imgname;
     $captchatext = md5(time());
     $captchatext = substr($captchatext, 0, 5);
     $_SESSION['captcha'] = $captchatext;
     if (file_exists($imgpath)) {
         $im = imagecreatefromjpeg($imgpath);
         $grey = imagecolorallocate($im, rand(1, 128), 128, 128);
         $font = $path . DS . 'fonts' . DS . '3D_Noise.ttf';
         imagettftext($im, 36, 0, 0, 55, $grey, $font, $captchatext);
         header('Content-Type: image/jpeg');
         header("Cache-control: private, no-cache");
         header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
         header("Pragma: no-cache");
         imagejpeg($im);
         imagedestroy($im);
         ob_flush();
         flush();
     } else {
         echo 'captcha error';
         exit;
     }
 }
开发者ID:BGCX067,项目名称:ezord-svn-to-git,代码行数:31,代码来源:captcha.php


示例10: download_f

 function download_f()
 {
     $file = $this->get("file");
     $id = $this->get("id");
     if (!$id && !$file) {
         error(P_Lang('未指定ID'), "", "error");
     }
     if ($id) {
         $rs = $this->model('res')->get_one($id);
         $file = $rs["filename"];
         $title = $rs["title"] . "." . $rs["ext"];
     } else {
         $title = basename($file);
     }
     if (!$file) {
         error(P_Lang('未指定附件'), "", "error");
     }
     if (substr($file, 0, 7) != "http://" && substr($file, 0, 8) != "https://") {
         $file = $this->dir_root . $file;
     }
     if (!file_exists($file)) {
         error(P_Lang('附件不存在'), "", "error");
     }
     $filesize = filesize($file);
     ob_end_clean();
     header("Date: " . gmdate("D, d M Y H:i:s", $this->system_time) . " GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s", $this->system_time) . " GMT");
     header("Content-Encoding: none");
     header("Content-Disposition: attachment; filename=" . rawurlencode($title));
     header("Content-Length: " . $filesize);
     header("Accept-Ranges: bytes");
     readfile($file);
     flush();
     ob_flush();
 }
开发者ID:joyerma,项目名称:yongzhuo,代码行数:35,代码来源:res_action_control.php


示例11: flush

 public function flush(\JsonSerializable $object)
 {
     echo json_encode($object) . "\n";
     flush();
     ob_flush();
     usleep(333);
 }
开发者ID:rootree,项目名称:TradeTracker,代码行数:7,代码来源:StreamOutput.php


示例12: backview

/**
 * Inlude a view path
 **/
function backview($view, $variables = array())
{
    extract($variables);
    ob_flush();
    include_once views('backend/' . $view);
    ob_clean();
}
开发者ID:slim12kg,项目名称:Anastat,代码行数:10,代码来源:functions.php


示例13: display

 function display()
 {
     $focus = new Insurances();
     $ss = new Sugar_Smarty();
     $db = DBManagerFactory::getInstance();
     // ONLY LOAD A RECORD IF A RECORD ID IS GIVEN;
     // A RECORD ID IS NOT GIVEN WHEN VIEWING IN LAYOUT EDITOR
     $record = isset($_GET["record"]) ? htmlspecialchars($_GET["record"]) : '';
     $template = file_get_contents('modules/Insurances/tpls/export.tpl');
     $name = "";
     $start = "";
     $end = "";
     $canhan = "";
     $giadinh = "";
     $canhan = $focus->get_data_insurances_canhan($record, $name, $start, $end);
     $giadinh = $focus->get_data_insurances_giadinh($record, $name, $start, $end);
     $template = str_replace("{CANHAN}", $canhan, $template);
     $template = str_replace("{GIADINH}", $giadinh, $template);
     $template = str_replace("{TITLE}", $name, $template);
     $template = str_replace("{NGAYBATDAU}", $start, $template);
     $template = str_replace("{NGAYKETTHUC}", $end, $template);
     $size = strlen($template);
     $filename = strtoupper($name) . ".doc";
     ob_end_clean();
     header("Cache-Control: private");
     header("Content-Type: application/force-download;");
     header("Content-Disposition:attachment; filename=\"{$filename}\"");
     header("Content-length:{$size}");
     echo $template;
     ob_flush();
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:view.exporttoword.php


示例14: do_it

 function do_it($image, $ImgWaterPath, $ImgWaterPos, $ImageWaterAlpha, $i)
 {
     echo "正在处理第" . $i . "张图片:" . $image . "<br/>";
     flush();
     ob_flush();
     Image::water($image, $ImgWaterPath, $ImgWaterPos, '', $ImageWaterAlpha);
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:7,代码来源:WaterAction.class.php


示例15: download

 public function download($file, $name = '', $size = 0, $reload = false)
 {
     if ($name == '') {
         $name = basename($file);
     }
     $fp = fopen($file, 'rb');
     if (!$size) {
         $size = filesize($file);
     }
     $ranges = $this->getRange($size);
     if ($reload && $ranges != null) {
         header('HTTP/1.1 206 Partial Content');
         header('Accept-Ranges:bytes');
         header(sprintf('content-length:%u', $ranges['end'] - $ranges['start']));
         header(sprintf('content-range:bytes %s-%s/%s', $ranges['start'], $ranges['end'], $size));
         fseek($fp, sprintf('%u', $ranges['start']));
     } else {
         header('HTTP/1.1 200 OK');
         header('content-length:' . $size);
     }
     while (!feof($fp)) {
         echo fread($fp, round($this->_speed * 1024, 0));
         ob_flush();
         flush();
         //sleep(1);
     }
     $fp != null && fclose($fp);
 }
开发者ID:xpchg,项目名称:iBarn,代码行数:28,代码来源:FileDownload.class.php


示例16: status

function status($message)
{
    echo $message;
    @ob_flush();
    flush();
    @ob_end_flush();
}
开发者ID:saqar,项目名称:tc_aowow,代码行数:7,代码来源:generate_maps1.php


示例17: Status

 private static function Status($Message)
 {
     echo $Message;
     @ob_flush();
     flush();
     @ob_end_flush();
 }
开发者ID:anonymous33rus,项目名称:FreedomCore,代码行数:7,代码来源:ImageGenerator.Class.php


示例18: rmdirr

function rmdirr($dirname)
{
    ob_start();
    if (!is_dir($dirname)) {
        return false;
    }
    $dscan = array(realpath($dirname));
    $darr = array();
    while (!empty($dscan)) {
        $dcur = array_pop($dscan);
        $darr[] = $dcur;
        if ($d = opendir($dcur)) {
            while ($f = readdir($d)) {
                if ($f == '.' || $f == '..') {
                    continue;
                }
                $f = $dcur . '/' . $f;
                if (is_dir($f)) {
                    $dscan[] = $f;
                } else {
                    unlink($f);
                }
            }
            closedir($d);
        }
    }
    for ($i = count($darr) - 1; $i >= 0; $i--) {
        @rmdir($darr[$i]);
    }
    ob_flush();
    return !is_dir($dirname);
}
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:32,代码来源:remove.php


示例19: ddd

 function ddd()
 {
     // Convert the non-string arguments into lovely code blocks.
     $args = func_get_args();
     foreach ($args as $index => $arg) {
         $export = false;
         $export |= is_bool($arg);
         $export |= is_array($arg);
         $export |= is_object($arg);
         if ($export) {
             $args[$index] = sprintf('%s', var_dump($arg, true));
         }
     }
     $text = $args[0];
     if (strpos($text, '%') !== false) {
         // Put all of the arguments into one string.
         $text = @call_user_func_array('sprintf', $args);
         if ($text == '') {
             $text = $args[0];
         }
     } else {
         $text = implode("<br/>\n", $args);
     }
     // Date class: string
     $text = sprintf('<pre>%s %s%s</pre>', date('H:i:s'), $text, "\n");
     echo $text;
     ob_flush();
 }
开发者ID:Garth619,项目名称:wines-by-jennifer,代码行数:28,代码来源:bootstrap.php


示例20: queueOp

 public function queueOp()
 {
     if (ob_get_level()) {
         ob_end_clean();
     }
     $model_queue = Model('queue', BASE_PATH);
     $worker = new Uk86QueueServer();
     while (true) {
         $list_key = $worker->scan();
         if (!empty($list_key) && is_array($list_key)) {
             foreach ($list_key as $key) {
                 $content = $worker->pop($key);
                 if (empty($content)) {
                     continue;
                 }
                 $method = key($content);
                 $arg = current($content);
                 $model_queue->{$method}($arg);
                 echo date('Y-m-d H:i:s', time()) . ' ' . $method . "\n";
                 //                     $content['time'] = date('Y-m-d H:i:s',time());
                 //                     print_R($content);
                 //                     echo "\n";
                 flush();
                 ob_flush();
             }
         }
         sleep(1);
     }
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:29,代码来源:index.php



注:本文中的ob_flush函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ob_get_clean函数代码示例发布时间:2022-05-15
下一篇:
PHP ob_end_flush函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap