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

PHP get_temp函数代码示例

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

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



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

示例1: get_stats

function get_stats() {
	$stats['cpu'] = cpu_usage();
	$stats['mem'] = mem_usage();
	$stats['uptime'] = get_uptime();
	$stats['states'] = get_pfstate();
	$stats['temp'] = get_temp();
	$stats['datetime'] = update_date_time();
	$stats['interfacestatistics'] = get_interfacestats();
	$stats['interfacestatus'] = get_interfacestatus();
	$stats['gateways'] = get_gatewaystats();
	$stats = join("|", $stats);
	return $stats;
}
开发者ID:rdmenezes,项目名称:pfsense,代码行数:13,代码来源:functions.inc.php


示例2: get_stats

function get_stats()
{
    $stats['cpu'] = cpu_usage();
    $stats['mem'] = mem_usage();
    $stats['uptime'] = get_uptime();
    $stats['states'] = get_pfstate();
    $stats['temp'] = get_temp();
    $stats['datetime'] = update_date_time();
    $stats['interfacestatistics'] = get_interfacestats();
    $stats['interfacestatus'] = get_interfacestatus();
    $stats['cpufreq'] = get_cpufreq();
    $stats['load_average'] = get_load_average();
    $stats['mbuf'] = get_mbuf();
    $stats['mbufpercent'] = get_mbuf(true);
    $stats['statepercent'] = get_pfstate(true);
    $stats = join("|", $stats);
    return $stats;
}
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:18,代码来源:functions.inc.php


示例3: while

$content = "";
while ($item = $data->fetch_array($frontsql)) {
    if ($item['type'] == 0) {
        if (get_auth($item['item'], 1) == 1) {
            $pagesql = $data->select_query("static_content", "WHERE id = '{$item['item']}' AND trash=0");
            $stuff = $data->fetch_array($pagesql);
            $content .= "<div class=\"frontpage\">" . censor($stuff['content']) . "</div>";
        }
    } elseif ($item['type'] == 1) {
        $funsql = $data->select_query("functions", "where id = '{$item['item']}'");
        $stuff = $data->fetch_array($funsql);
        if (get_auth($stuff['code'], 0) == 1) {
            if (file_exists($stuff['code'] . $phpex)) {
                include $stuff['code'] . $phpex;
            }
            if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") {
                $content .= "<div class=\"frontpage\">" . get_temp($pagename, $pagenum) . "</div>";
            }
        }
    }
    $content .= "<br />";
}
if ($content == "") {
    $content = "No frontpage defined";
}
$add = false;
$edit = false;
$dbpage = true;
$pagename = 'frontpage';
$location = "Home Page";
$helpid = 1;
开发者ID:burak-tekin,项目名称:CMScout2,代码行数:31,代码来源:frontpage.php


示例4: htmlspecialchars

echo htmlspecialchars($mbufstext);
?>
)</span>
			</td>
		</tr>
		<?php 
if (get_temp() != "") {
    ?>
		<tr>
			<th><?php 
    echo gettext("Temperature");
    ?>
</th>
			<td>
				<?php 
    $TempMeter = $temp = get_temp();
    ?>
				<div id="tempPB"></div>
				<span id="tempmeter"><?php 
    echo $temp . "&#176;C";
    ?>
</span>
			</td>
		</tr>
		<?php 
}
?>
		<tr>
			<th><?php 
echo gettext("Load average");
?>
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:system_information.widget.php


示例5: htmlspecialchars

echo htmlspecialchars($mbufstext);
?>
)</span>
			</td>
		</tr>
		<?php 
if (get_temp() != "") {
    ?>
		<tr>
			<th><?php 
    echo gettext("Temperature");
    ?>
</th>
			<td>
				<?php 
    $temp_deg_c = get_temp();
    ?>
				<div class="progress">
					<div id="tempPB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?php 
    echo $temp_deg_c;
    ?>
" aria-valuemin="0" aria-valuemax="100" style="width: <?php 
    echo $temp_deg_c;
    ?>
%">
					</div>
				</div>
				<span id="tempmeter"><?php 
    echo $temp_deg_c . "&deg;C";
    ?>
</span>
开发者ID:KyleJohnstonNet,项目名称:pfsense,代码行数:31,代码来源:system_information.widget.php


示例6: get_status

?>

                <br>
		<!-- Display a few statuses -->
		<b>Current status:</b> <?php 
get_status();
?>
 <br>
		<b>Current vid:</b> <?php 
get_currentvid();
?>
 <br>
		<!-- This is return output from pressing buttons -->
		<b>Messages:</b> <i id="res">&nbsp;</i><i id="err">&nbsp;</i> <br>
		<b>Temp:</b> <?php 
get_temp();
?>

			<!-- build Button display and actions -->
			<table cellspacing="5" cellpadding="0" border="0">
				<tr>
					<td>
						<button type="button" class="button" onclick="omxajax('voldown');">VOLUME -</button>
					</td>
					<td>
						<button type="button" class="button" onclick="omxajax('play');">PLAY</button>
					</td>
					<td>
						<button type="button" class="button" onclick="omxajax('volup');">VOLUME +</button>
					</td>
				</tr>
开发者ID:mgroseman,项目名称:omxplayer-web-controls-php,代码行数:31,代码来源:omxplayer.php


示例7: show_message

         show_message("The module you are trying to access is either not a valid module, or it has been disabled");
     } else {
         include 'frontpage' . $phpex;
     }
     $tpl->assign("cpallowed", get_auth("usercp", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'usercp'")));
     $tpl->assign("profileallowed", get_auth("profile", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'profile'")));
     $tpl->assign("contributionallowed", get_auth("mythings", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'mythings'")));
     $tpl->assign("groupsallowed", get_auth("mypatrol", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'mypatrol'")));
     $tpl->assign("pmallowed", get_auth("pmmain", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'pmmain'")));
 }
 if ($pagenum == 0) {
     $pagenum = 1;
 }
 if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") {
     $dataC = true;
     $filetouse = get_temp($pagename, $pagenum);
 } elseif ($pagename == "frontpage") {
     $dataC = true;
     $filetouse = $content;
 } elseif ($dbpage == false && $message != "" && $othermessage == false) {
     $filetouse = $message;
     $dataC = true;
 }
 if ($filetouse == "") {
     $dataC = false;
     $filetouse = $pagename;
 }
 if ((!isset($filetouse) || $filetouse == "") && (!isset($pagename) || $pagename == "")) {
     $dataC = true;
     show_message("That page or module could not be found");
 }
开发者ID:burak-tekin,项目名称:CMScout2,代码行数:31,代码来源:getcontent.php


示例8: get_all_disks_info

 $disks = get_all_disks_info();
 echo "<table class='usb_disks custom_head'><thead><tr><td>Device</td><td>Identification</td><td></td><td>Temp</td><td>FS</td><td>Size</td><td>Open files</td><td>Used</td><td>Free</td><td>Auto mount</td><td>Share</td><td>Log</td><td>Script</td></tr></thead>";
 echo "<tbody>";
 if (count($disks)) {
     $odd = "odd";
     foreach ($disks as $disk) {
         $mounted = in_array(TRUE, array_map(function ($ar) {
             return is_mounted($ar['device']);
         }, $disk['partitions']));
         $disk_name = basename($disk['device']);
         $p = count($disk['partitions']) > 0 ? render_partition($disk, $disk['partitions'][0]) : FALSE;
         $preclearing = $Preclear ? $Preclear->isRunning($disk_name) : false;
         $is_precleared = $disk['partitions'][0]['fstype'] == "precleared" ? true : false;
         $flash = $disk['partitions'][0]['fstype'] == "vfat" || $disk['partitions'][0]['fstype'] == "exfat" ? true : false;
         if ($mounted || is_file($disk['partitions'][0]['command']) || $preclearing) {
             $disk['temperature'] = get_temp($disk['device']);
         }
         $temp = my_temp($disk['temperature']);
         $mbutton = make_mount_button($disk);
         $preclear_link = $disk['size'] !== 0 && !$flash && !$mounted && $Preclear && !$preclearing ? "&nbsp;&nbsp;" . $Preclear->Link($disk_name, "icon") : "";
         if ($p && !($is_precleared || $preclearing)) {
             $add_toggle = TRUE;
             $hdd_serial = "<span title='Click to view partitions/mount points.' class='exec toggle-hdd' hdd='{$disk_name}'>\n\t\t\t\t\t\t\t\t\t\t\t\t \t<i class='glyphicon glyphicon-hdd hdd'></i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class='glyphicon glyphicon-plus-sign glyphicon-append'></i>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t{$disk[serial]}\n\t\t\t\t\t\t\t\t\t\t\t\t{$preclear_link}\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='preclear_{$disk_name}'></div>";
         } else {
             $add_toggle = FALSE;
             $hdd_serial = "<span class='toggle-hdd' hdd='{$disk_name}'>\n\t\t\t\t\t\t\t\t\t\t\t\t \t<i class='glyphicon glyphicon-hdd hdd'></i>\n\t\t\t\t\t\t\t\t\t\t\t\t </span>\n\t\t\t\t\t\t\t\t\t\t\t\t <span style='margin:4px;'></span>\n\t\t\t\t\t\t\t\t\t\t\t\t {$disk[serial]}\n\t\t\t\t\t\t\t\t\t\t\t\t {$preclear_link}\n\t\t\t\t\t\t\t\t\t\t\t\t <div id='preclear_{$disk_name}'></div>";
         }
         echo "<tr class='{$odd} toggle-disk'>";
         if ($flash || !is_file($disk['partitions'][0]['command']) && !$mounted && !$preclearing) {
             echo "<td><img src='/webGui/images/green-blink.png'> {$disk_name}</td>";
         } else {
开发者ID:dlandon,项目名称:unassigned.devices,代码行数:31,代码来源:UnassignedDevices.php


示例9: curl_setopt

    curl_setopt($ch, CURLOPT_URL, $tem_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $tem_data = curl_exec($ch);
    curl_close($ch);
    $tem_reg = '/<resvalue>(.*?)<\\/resvalue>/';
    $tem_ret = is_valid($tem_data, $tem_reg);
    $tag_start_len = strlen('<resvalue>');
    $tag_end_len = strlen('<\\/resvalue>');
    $gross_len = strlen($tem_ret);
    $tem_len = $gross_len - $tag_start_len - $tag_end_len;
    $tem_ret = substr($tem_ret, $tag_start_len, $tem_len + 1);
    return $tem_ret;
}
// for test
$tem_ret = get_temp();
//   echo $tem_ret;
function get_wet()
{
    $wet_url = 'http://121.42.31.195:9071/WIFPa/ResourceData.xml/0001000054f08cfa?ResourceID=4';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $wet_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $wet_data = curl_exec($ch);
    curl_close($ch);
    $wet_reg = '/<resvalue>(.*?)<\\/resvalue>/';
    $wet_ret = is_valid($wet_data, $wet_reg);
    $tag_start_len = strlen('<resvalue>');
    $tag_end_len = strlen('<\\/resvalue>');
    $gross_len = strlen($wet_ret);
开发者ID:EmuxEvans,项目名称:wot_gateway,代码行数:31,代码来源:get_all.php


示例10: show_message

        show_message("You do not have the required permissions to view that page", "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}");
    }
} else {
    $edit = adminauth("patrol", "edit") && !adminauth("patrol", "limit") || adminauth("patrol", "edit") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false;
    $add = adminauth("patrol", "add") && !adminauth("patrol", "limit") || adminauth("patrol", "add") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false;
    $addlink = "admin.php?page=patrol&amp;subpage=patrolcontent&amp;action=new&amp;pid={$patrolid}";
    $editlink = "admin.php?page=patrol&amp;subpage=patrolcontent&amp;id={$content}&amp;action=edit&amp;pid={$patrolid}";
}
if ($sitecontent === false) {
    show_message("That page is only accessible by members of the group", $site != NULL ? "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}&site={$site}" : "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}");
}
if ($pagenum == 0) {
    $pagenum = 1;
}
if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") {
    $sitecontent = get_temp($pagename, $pagenum);
} elseif (isset($pagename) && $pagename == "frontpage") {
    $sitecontent = $content;
} elseif ($dbpage == false && $message != "") {
    $sitecontent = $message;
    $dataC = true;
    $othermessage = true;
}
if ($sitecontent == "") {
    $sitecontent = $pagename;
}
if ((!isset($sitecontent) || $sitecontent == "") && (!isset($pagename) || $pagename == "")) {
    $sitecontent = "No Content";
}
$groupstats[0] = $data->num_rows($data->select_query("patrol_articles", "WHERE allowed=1 AND trash=0 AND patrol={$safepatrolid}"));
$groupstats[1] = $data->num_rows($data->select_query("album_track", "WHERE allowed=1 AND trash=0 AND patrol={$safepatrolid}"));
开发者ID:burak-tekin,项目名称:CMScout2,代码行数:31,代码来源:patrolpages.php


示例11: get_all_disks_info

function get_all_disks_info($bus="all") {
  // $d1 = time();
  $disks = get_unasigned_disks();
  foreach ($disks as $key => $disk) {
    if ($disk['type'] != $bus && $bus != "all") continue;
    $disk['temperature'] = get_temp($key);
    foreach ($disk['partitions'] as $k => $p) {
      $disk['partitions'][$k] = get_partition_info($p);
    }
    $disks[$key] = $disk;
  }
  // debug("get_all_disks_info: ".(time() - $d1));
  return $disks;
}
开发者ID:roninkenji,项目名称:unRAID-plugins,代码行数:14,代码来源:usb_mount_lib.php


示例12: get_all_disks_info

function get_all_disks_info($bus="all") {
  // $d1 = time();
  $disks = get_unasigned_disks();
  foreach ($disks as $key => $disk) {
    if ($disk['type'] != $bus && $bus != "all") continue;
    $disk['temperature'] = get_temp($key);
    $disk['size'] = intval(trim(shell_exec("blockdev --getsize64 ${key} 2>/dev/null")));
    $disk = array_merge($disk, get_disk_info($key));
    $disks[$key] = $disk;
  }
  // debug("get_all_disks_info: ".(time() - $d1));
  usort($disks, create_function('$a, $b','$key="device";if ($a[$key] == $b[$key]) return 0; return ($a[$key] < $b[$key]) ? -1 : 1;'));
  return $disks;
}
开发者ID:roninkenji,项目名称:unRAID-plugins,代码行数:14,代码来源:Preclear.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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