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

PHP get_microtime函数代码示例

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

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



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

示例1: query

 function query($sql, $unbuffered = false)
 {
     if (strlen($sql) > 140000) {
         exit('Insane query. Aborting.');
     }
     if (defined('FORUM_SHOW_QUERIES')) {
         $q_start = get_microtime();
     }
     if ($unbuffered) {
         $this->query_result = @mysql_unbuffered_query($sql, $this->link_id);
     } else {
         $this->query_result = @mysql_query($sql, $this->link_id);
     }
     if ($this->query_result) {
         if (defined('FORUM_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
         }
         ++$this->num_queries;
         return $this->query_result;
     } else {
         if (defined('FORUM_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, 0);
         }
         return false;
     }
 }
开发者ID:vebnz,项目名称:lifelitup,代码行数:26,代码来源:mysql.php


示例2: ptime

function ptime()
{
    global $time_start;
    $time_end = get_microtime();
    $ptime = $time_end - $time_start;
    return substr($ptime, 0, 8);
}
开发者ID:dalinhuang,项目名称:c2my,代码行数:7,代码来源:common.inc.php


示例3: query

 function query($sql, $unbuffered = false)
 {
     if (strlen($sql) > 140000) {
         exit('Insane query. Aborting.');
     }
     $this->last_query = $sql;
     if (defined('LUNA_SHOW_QUERIES')) {
         $q_start = get_microtime();
     }
     $this->query_result = $this->link_id->query($sql);
     if ($this->query_result) {
         if (defined('LUNA_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
         }
         ++$this->num_queries;
         return $this->query_result;
     } else {
         if (defined('LUNA_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, 0);
         }
         $this->error_no = $this->link_id->lastErrorCode();
         $this->error_msg = $this->link_id->lastErrorMsg();
         if ($this->in_transaction) {
             $this->link_id->exec('ROLLBACK');
         }
         --$this->in_transaction;
         return false;
     }
 }
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:29,代码来源:sqlite3.php


示例4: query

 function query($query, $bypass_error = FALSE, $unbufferd = false)
 {
     $this->querytime = get_microtime();
     $this->query_result = $this->connect_id->query($query, $unbufferd ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT);
     if ($this->query_result) {
         return $this->query_result;
     } else {
         if (($this->connect_id->errno == 1030 && strpos($this->connect_id->error, '127') || $this->connect_id->errno == 1034 || $this->connect_id->errno == 1035) && preg_match('#(INTO|FROM)\\s+([a-z_]+)#i', $query, $match) && $this->connect_id->query('REPAIR TABLE ' . $match[2])) {
             $this->query_result = $this->connect_id->query($query, $unbufferd ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT);
             if ($this->query_result) {
                 return $this->query_result;
             }
         } else {
             if ($this->connect_id->errno == 1062 && preg_match('#ALTER\\s+TABLE\\s+([a-z_]+)\\s+ADD\\s+PRIMARY\\s+KEY\\s+\\(([a-z_]+)\\)#i', $query, $table) && preg_match("#Duplicate\\s+entry\\s+'(.*)'\\s+for\\s+key#i", $this->connect_id->error, $entry) && $this->connect_id->query("DELETE FROM {$table['1']} WHERE {$table['2']} LIKE '{$entry['1']}%' LIMIT " . ($this->connect_id->query("SELECT {$table['2']} FROM {$table['1']} WHERE {$table['2']} LIKE '{$entry['1']}%'")->num_rows - 1)) || $this->connect_id->errno == 1062 && preg_match('#CREATE\\s+UNIQUE\\s+INDEX\\s+([a-z_]+)\\s+ON\\s+([a-z_]+)\\s+\\(([a-z_]+)\\)#i', $query, $table) && preg_match("#Duplicate\\s+entry\\s+'(.*)'\\s+for\\s+key#i", $this->connect_id->error, $entry) && $this->connect_id->query("DELETE FROM {$table['2']} WHERE {$table['3']} LIKE '{$entry['1']}%' LIMIT " . ($this->connect_id->query("SELECT {$table['3']} FROM {$table['2']} WHERE {$table['3']} LIKE '{$entry['1']}%'")->num_rows - 1))) {
                 return $this->query($query, $bypass_error, $unbufferd);
             } else {
                 if ($this->connect_id->errno == 1007 && preg_match('#CREATE\\s+DATABASE\\s+#i', $query)) {
                     return true;
                 }
             }
         }
     }
     if ($bypass_error) {
         return NULL;
     } else {
         $this->show_error("While executing query \"{$query}\"\n\nthe following error occured: " . $this->connect_id->error);
     }
 }
开发者ID:cbsistem,项目名称:nexos,代码行数:28,代码来源:mysqli.php


示例5: query

 function query($sql, $unbuffered = false)
 {
     if (defined('PUN_SHOW_QUERIES')) {
         $q_start = get_microtime();
     }
     if ($unbuffered) {
         $this->query_result = @mysql_unbuffered_query($sql, $this->link_id);
     } else {
         $this->query_result = @mysql_query($sql, $this->link_id);
     }
     if ($this->query_result) {
         if (defined('PUN_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
         }
         ++$this->num_queries;
         return $this->query_result;
     } else {
         if (defined('PUN_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, 0);
         }
         $this->error_no = @mysql_errno($this->link_id);
         $this->error_msg = @mysql_error($this->link_id);
         return false;
     }
 }
开发者ID:highpictv,项目名称:forum,代码行数:25,代码来源:mysql.php


示例6: query

 function query($sql, $unbuffered = false)
 {
     if (strlen($sql) > 140000) {
         exit('Insane query. Aborting.');
     }
     if (defined('OPENLD_SHOW_QUERIES')) {
         $q_start = microtime_float();
     }
     $this->query_result = @mysqli_query($this->link_id, $sql);
     if ($this->query_result) {
         if (defined('OPENLD_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
         }
         ++$this->num_queries;
         return $this->query_result;
     } else {
         if (defined('OPENLD_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, 0);
         }
         // Rollback transaction
         if ($this->in_transaction) {
             mysqli_query($this->link_id, 'ROLLBACK');
         }
         --$this->in_transaction;
         return false;
     }
 }
开发者ID:Dawzz,项目名称:Open-Link-Directory,代码行数:27,代码来源:mysqli_innodb.php


示例7: build

 /**
  * Make sure that the model is configured with a valid URL.
  *
  * @return string json
  */
 function build()
 {
     if ($site_id = $this->config('site_id')) {
         $s = get_microtime();
         $es = new entity_selector();
         $es->add_type(id_of('social_account_type'));
         $es->add_right_relationship($site_id, relationship_id_of('site_to_social_account'));
         $es->add_rel_sort_field($site_id, relationship_id_of('site_to_social_account'));
         $es->set_order('rel_sort_order ASC');
         $es->limit_tables();
         $es->limit_fields();
         if ($results = $es->run_one()) {
             $result_keys = array_keys($results);
             $sih = reason_get_social_integration_helper();
             foreach ($result_keys as $id) {
                 // get the integrator if it supports the SocialAccountProfileLinks interface
                 if ($integrator = $sih->get_social_account_integrator($id, 'SocialAccountProfileLinks')) {
                     $profile_links[$id]['icon'] = $integrator->get_profile_link_icon($id);
                     $profile_links[$id]['text'] = $integrator->get_profile_link_text($id);
                     $profile_links[$id]['href'] = $integrator->get_profile_link_href($id);
                 }
             }
             if (!empty($profile_links)) {
                 return $profile_links;
             }
         }
         return false;
     } else {
         trigger_error('The ReasonSocialProfileLinksModel must be provided with the configuration parameter site_id.', FATAL);
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:36,代码来源:profile_links.php


示例8: query

 function query($sql, $unbuffered = false)
 {
     if (defined('LUNA_SHOW_QUERIES')) {
         $q_start = get_microtime();
     }
     if ($unbuffered) {
         $this->query_result = @sqlite_unbuffered_query($this->link_id, $sql);
     } else {
         $this->query_result = @sqlite_query($this->link_id, $sql);
     }
     if ($this->query_result) {
         if (defined('LUNA_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
         }
         ++$this->num_queries;
         return $this->query_result;
     } else {
         if (defined('LUNA_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, 0);
         }
         $this->error_no = @sqlite_last_error($this->link_id);
         $this->error_msg = @sqlite_error_string($this->error_no);
         if ($this->in_transaction) {
             @sqlite_query($this->link_id, 'ROLLBACK');
         }
         --$this->in_transaction;
         return false;
     }
 }
开发者ID:BlitzFirePlayz,项目名称:Luna,代码行数:29,代码来源:sqlite.php


示例9: query

 public function query($sql, $unbuffered = false)
 {
     if (defined('FEATHER_SHOW_QUERIES')) {
         $q_start = get_microtime();
     }
     $this->query_result = @mysqli_query($this->link_id, $sql);
     if ($this->query_result) {
         if (defined('FEATHER_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
         }
         ++$this->num_queries;
         return $this->query_result;
     } else {
         if (defined('FEATHER_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, 0);
         }
         $this->error_no = @mysqli_errno($this->link_id);
         $this->error_msg = @mysqli_error($this->link_id);
         // Rollback transaction
         if ($this->in_transaction) {
             mysqli_query($this->link_id, 'ROLLBACK');
         }
         --$this->in_transaction;
         return false;
     }
 }
开发者ID:beaver-dev,项目名称:featherbb,代码行数:26,代码来源:mysqli_innodb.php


示例10: query

 function query($sql, $unbuffered = false)
 {
     if (strrpos($sql, 'LIMIT') !== false) {
         $sql = preg_replace('#LIMIT ([0-9]+),([ 0-9]+)#', 'LIMIT \\2 OFFSET \\1', $sql);
     }
     if (defined('PUN_SHOW_QUERIES')) {
         $q_start = get_microtime();
     }
     @pg_send_query($this->link_id, $sql);
     $this->query_result = @pg_get_result($this->link_id);
     if (pg_result_status($this->query_result) != PGSQL_FATAL_ERROR) {
         if (defined('PUN_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
         }
         ++$this->num_queries;
         $this->last_query_text[$this->query_result] = $sql;
         return $this->query_result;
     } else {
         if (defined('PUN_SHOW_QUERIES')) {
             $this->saved_queries[] = array($sql, 0);
         }
         $this->error_no = false;
         $this->error_msg = @pg_result_error($this->query_result);
         if ($this->in_transaction) {
             @pg_query($this->link_id, 'ROLLBACK');
         }
         --$this->in_transaction;
         return false;
     }
 }
开发者ID:highpictv,项目名称:forum,代码行数:30,代码来源:pgsql.php


示例11: query

 public function query($sql, $memcache = false, $memcache_timeout = false)
 {
     if (!$this->useMemcache) {
         $memcache = false;
     }
     $start = get_microtime();
     $memcache_check = false;
     if ($memcache) {
         $result = $this->memcache->get($memcache, null, true);
         if ($result) {
             $memcache_check = true;
         }
     }
     if (!$memcache_check) {
         if (!$this->instance) {
             $this->connect();
         }
         $result = $this->instance->query($sql);
     }
     $end = get_microtime();
     if (!$result) {
         die("MySQL Error: " . $this->instance->error);
     }
     $log = array();
     $log['query'] = $sql;
     $log['time'] = number_format(round(($end - $start) * 1000, 4), 4);
     if ($memcache) {
         if ($memcache_check) {
             $log['memcache'] = 'get';
         } else {
             $log['memcache'] = 'add';
         }
     } else {
         $log['memcache'] = false;
     }
     array_push($this->query_log, $log);
     if ($memcache_check) {
         return $result;
     }
     if (strtoupper(substr(trim($sql), 0, 6)) == "SELECT") {
         $return_array = array();
         $return_array['result'] = array();
         $return_array['count'] = $result->num_rows;
         while ($row = $result->fetch_assoc()) {
             array_push($return_array['result'], $row);
         }
         if ($memcache) {
             $this->memcache->add($memcache, $return_array, false, $memcache_timeout ? $memcache_timeout : 0, true);
         }
         return $return_array;
     } elseif (strtoupper(substr(trim($sql), 0, 6)) == "INSERT") {
         return $this->instance->insert_id;
     } elseif (strtoupper(substr(trim($sql), 0, 6)) == "UPDATE") {
         return $this->instance->affected_rows;
     } else {
         return true;
     }
 }
开发者ID:noother,项目名称:NoothWork,代码行数:58,代码来源:MySQL.php


示例12: Saafooter

/**
* Footer
*
* To show footer of any page you want 
* paramenters : none
*/
function Saafooter($outscript = false)
{
    global $tpl, $SQL, $starttm, $config, $usrcp, $lang, $olang;
    global $do_gzip_compress, $script_encoding, $errorpage, $extras, $userinfo;
    //show stats ..
    $page_stats = '';
    if ($config['statfooter'] != 0) {
        $gzip = $config['gzip'] == '1' ? "Enabled" : "Disabled";
        $hksys = !defined('STOP_HOOKS') ? "Enabled" : "Disabled";
        $endtime = get_microtime();
        $loadtime = number_format($endtime - $starttm, 4);
        $queries_num = $SQL->query_num;
        $time_sql = round($SQL->query_num / $loadtime);
        $page_url = preg_replace(array('/([\\&\\?]+)debug/i', '/&/i'), array('', '&'), kleeja_get_page());
        $link_dbg = user_can('enter_acp') && $config['mod_writer'] != '1' ? '[ <a href="' . str_replace('&', '&amp;', $page_url) . (strpos($page_url, '?') === false ? '?' : '&amp;') . 'debug">More Details ... </a> ]' : null;
        $page_stats = "<strong>[</strong> GZIP : {$gzip} - Generation Time: {$loadtime} Sec  - Queries: {$queries_num} - Hook System:  {$hksys} <strong>]</strong>  " . $link_dbg;
    }
    $tpl->assign("page_stats", $page_stats);
    //if admin, show admin in the bottom of all page
    $tpl->assign("admin_page", user_can('enter_acp') ? '<a href="' . ADMIN_PATH . '" class="admin_cp_link"><span>' . $lang['ADMINCP'] . '</span></a>' : '');
    //assign cron
    $tpl->assign("run_queue", '<img src="' . $config['siteurl'] . 'go.php?go=queue" width="1" height="1" alt="queue" />');
    // if google analytics, new version
    //http://www.google.com/support/googleanalytics/bin/answer.py?answer=55488&topic=11126
    $googleanalytics = '';
    if (strlen($config['googleanalytics']) > 4) {
        $googleanalytics .= '<script type="text/javascript">' . "\n";
        $googleanalytics .= '<!--' . "\n";
        $googleanalytics .= 'var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");' . "\n";
        $googleanalytics .= 'document.write("\\<script src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'>\\<\\/script>" );' . "\n";
        $googleanalytics .= '-->' . "\n";
        $googleanalytics .= '</script>' . "\n";
        $googleanalytics .= '<script type="text/javascript">' . "\n";
        $googleanalytics .= '<!--' . "\n";
        $googleanalytics .= 'var pageTracker = _gat._getTracker("' . $config['googleanalytics'] . '");' . "\n";
        $googleanalytics .= 'pageTracker._initData();' . "\n";
        $googleanalytics .= 'pageTracker._trackPageview();' . "\n";
        $googleanalytics .= '-->' . "\n";
        $googleanalytics .= '</script>' . "\n";
    }
    $tpl->assign("googleanalytics", $googleanalytics);
    //check for extra header
    if (empty($extras['footer'])) {
        $extras['footer'] = false;
    }
    ($hook = kleeja_run_hook('func_Saafooter')) ? eval($hook) : null;
    //run hook
    $footer = $tpl->display("footer");
    ($hook = kleeja_run_hook('Saafooter_func')) ? eval($hook) : null;
    //run hook
    echo $footer;
    //page analysis
    if (isset($_GET['debug']) && user_can('enter_acp')) {
        kleeja_debug();
    }
    //at end, close sql connections
    $SQL->close();
}
开发者ID:Saleh7,项目名称:Kleeja,代码行数:64,代码来源:functions_display.php


示例13: print_version

function print_version()
{
    global $time_start, $gzip, $PRINT_DEBUG, $tracker_version;
    $time_end = get_microtime();
    $max_mem = memory_get_peak_usage();
    print "<p align='center'>";
    if ($PRINT_DEBUG) {
        print "<small>[ Execution Time: " . number_format($time_end - $time_start, 4) . " sec. ] - [Memcached Queries: " . MCached::$count . " (" . round(MCached::$time, 4) . " sec.)] - [Memory Usage: " . misc::makesize($max_mem) . "]</small><br />";
    }
    print "BtiTracker (" . $tracker_version . ") by <a href='https://github.com/Yupy/BtiTracker-1.5.1' target='_blank'>Yupy</a> & <a href='http://www.btiteam.org' target='_blank'>Btiteam</a></p>";
}
开发者ID:Q8HMA,项目名称:BtiTracker-1.5.1,代码行数:11,代码来源:functions.php


示例14: render_page

function render_page($license = false)
{
    global $aidlink, $locale, $settings, $colour_switcher, $fontsize_switcher, $main_style;
    echo "\n\t<div id='main' style='width: " . THEME_WIDTH . ";'>\n\t\t<div id='uborder' class='clearfix'>\n\t\t\t<div id='ucornerl' class='flleft'></div>\n\t\t\t<div id='ucornerr' class='flright'></div>\n\t\t</div>\n\t\t<div id='borderr'>\n\t\t\t<div id='borderl'>\n\t\t\t\t<div id='cont' class='clearfix {$main_style}'>\n\t\t\t\t\t<div id='userbar' class='floatfix'>\n\t\t\t\t\t\t<ul id='anchors' class='flleft'><li><a href='#Content'>" . $locale['global_210'] . "</a></li></ul>\n\t\t\t\t\t\t<ul id='links' class='clearfix flright'>\n";
    if (iMEMBER) {
        echo "\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "edit_profile.php'>" . $locale['global_120'] . "</a></li>\n\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "messages.php'>" . $locale['global_121'] . "</a></li>\n\t\t\t\t\t\t\t" . (iADMIN ? "<li><a href='" . ADMIN . "index.php" . $aidlink . "' >" . $locale['global_123'] . "</a></li>" : "") . "\n\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "setuser.php?logout=yes'>" . $locale['global_124'] . "</a></li>\n";
    } else {
        echo "\t\t\t\t\t\t\t<li><a href='" . BASEDIR . "login.php'>" . $locale['global_104'] . "</a></li>\n\t\t\t\t\t\t\t" . ($settings['enable_registration'] ? "<li><a href='" . BASEDIR . "register.php'>" . $locale['global_107'] . "</a></li>\n" : "");
    }
    echo "\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id='mainheader' class='clearfix'>" . showbanners() . "</div>\n\t\t\t\t\t<div id='subheader' class='clearfix'>" . preg_replace("^(li)( class='(first-link)')*(><a href='(\\.\\./)*" . preg_quote(START_PAGE) . "')^i", "\\1 class='active \\3'\\4", showsublinks("")) . "\n\t\t\t\t\t\t" . $colour_switcher->makeForm("flright") . " \n\t\t\t\t\t\t" . $fontsize_switcher->makeForm("flright") . "\n\t\t\t\t\t</div>\n\t\t\t\t\t" . (LEFT ? "<div id='side-border-left'>" . LEFT . "</div>" : "") . "\n\t\t\t\t\t" . (RIGHT ? "<div id='side-border-right'>" . RIGHT . "</div>" : "") . "\n\t\t\t\t\t<div id='main-bg'><div id='container'>" . U_CENTER . CONTENT . L_CENTER . "\n\t\t\t\t\t</div></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div id='lborder'>\n\t\t\t<div id='lcornerl' class='flleft'></div>\n\t\t\t<div id='lcornerr' class='flright'></div>\n\t\t</div>\n\t\t<div id='footer' class='clearfix'>\n\t\t\t" . (!$license ? "<div class='flleft' style='width: 50%'>" . showcopyright() . "<br />\n Theme designed by <a href='http://matonor.com'>Max Toball</a></div>" : "") . "\n\t\t\t<div class='flright' style='width: 50%; text-align: right;'>" . stripslashes($settings['footer']) . "</div>\n\t\t</div>\n\t\t<div id='subfooter' class='clearfix'>\n\t\t\t<div class='flleft' style='width: 50%'>" . sprintf($locale['global_172'], substr(get_microtime() - START_TIME, 0, 4)) . "</div>\n\t\t\t<div class='flright' style='width: 50%; text-align: right;'>" . showcounter() . "</div>\n\t\t</div>\n\t</div>";
}
开发者ID:dioda,项目名称:phpfusion,代码行数:11,代码来源:theme.php


示例15: print_version

function print_version()
{
    global $time_start, $gzip, $PRINT_DEBUG, $tracker_version;
    $time_end = get_microtime();
    $max_mem = memory_get_peak_usage();
    print "<p align='center'>";
    if ($PRINT_DEBUG) {
        print "[ Execution time: " . number_format($time_end - $time_start, 4) . " sec. ] - [Memory usage: " . misc::makesize($max_mem) . "] - [ GZIP: " . $gzip . " ]<br />";
    }
    print "BtiTracker (" . $tracker_version . ") by <a href='https://github.com/Yupy/BtiTracker-1.5.0' target='_blank'>Yupy</a> & <a href='http://www.btiteam.org' target='_blank'>Btiteam</a></p>";
}
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:11,代码来源:functions.php


示例16: tokenize

 public function tokenize($test, $flag)
 {
     $flag = constant("HTML5_Tokenizer::{$flag}");
     if (!isset($test->lastStartTag)) {
         $test->lastStartTag = null;
     }
     $tokenizer = new HTML5_TestableTokenizer($test->input, $flag, $test->lastStartTag);
     $GLOBALS['TIME'] -= get_microtime();
     $tokenizer->parse();
     $GLOBALS['TIME'] += get_microtime();
     return $tokenizer->outputTokens;
 }
开发者ID:muddy-28,项目名称:html5lib-php,代码行数:12,代码来源:TokenizerTest.php


示例17: dbresult

function dbresult($query, $row)
{
    global $mysql_queries_count, $mysql_queries_time;
    $query_time = get_microtime();
    $result = @mysql_result($query, $row);
    $query_time = substr(get_microtime() - $query_time, 0, 7);
    $mysql_queries_time[$mysql_queries_count] = array($query_time, $query);
    if (!$result) {
        echo mysql_error();
        return false;
    } else {
        return $result;
    }
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:14,代码来源:mysql_functions_include.php


示例18: invoke

 public function invoke($test)
 {
     // this is totally the wrong interface to use, but
     // for now we need testing
     $tokenizer = new HTML5_Tokenizer($test['data']);
     $GLOBALS['TIME'] -= get_microtime();
     if (isset($test['document-fragment'])) {
         $tokenizer->parseFragment($test['document-fragment']);
     } else {
         $tokenizer->parse();
     }
     $GLOBALS['TIME'] += get_microtime();
     $this->assertIdentical($test['document'], HTML5_TestData::strDom($tokenizer->save()), $test);
 }
开发者ID:muddy-28,项目名称:html5lib-php,代码行数:14,代码来源:TreeBuilderTest.php


示例19: log

 public function log($sql, array $params = null, array $types = null)
 {
     global $MAIN_CFG;
     $this->query_start_time = get_microtime();
     if (NEXOS_DEBUG || is_admin() && !empty($MAIN_CFG['debug']['database'])) {
         $failed = false;
         $this->_backtrace();
         $new_log['line'] = $this->line;
         $new_log['query'] = htmlprepare($sql);
         $new_log['params'] = htmlprepare($params);
         $new_log['types'] = htmlprepare($types);
         $new_log['failed'] = $failed;
         $this->query_list[$this->file][$this->num_queries] = $new_log;
     }
 }
开发者ID:cbsistem,项目名称:nexos,代码行数:15,代码来源:doctrine.php


示例20: dbresult

function dbresult($query, $row)
{
    global $pdo, $mysql_queries_count, $mysql_queries_time;
    $query_time = get_microtime();
    $data = $query->fetchAll();
    $query_time = substr(get_microtime() - $query_time, 0, 7);
    $mysql_queries_time[$mysql_queries_count] = array($query_time, $query);
    if (!$query) {
        print_r($query->errorInfo());
        return FALSE;
    } else {
        $result = $query->getColumnMeta(0);
        return $data[$row][$result['name']];
    }
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:15,代码来源:pdo_functions_include.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_mid函数代码示例发布时间:2022-05-15
下一篇:
PHP get_metastring_id函数代码示例发布时间: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