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

PHP getOS函数代码示例

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

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



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

示例1: _initialize

 function _initialize()
 {
     header("Content-type:text/html;charset=utf-8");
     import("ORG.File");
     import("ORG.Plugin");
     $model = M('config');
     $list = $model->select();
     foreach ($list as $v) {
         $GLOBALS[$v['varname']] = $v['value'];
     }
     //临时关闭
     if ($GLOBALS['cfg_cmsswitch'] == 0) {
         die($GLOBALS['cfg_cmsswitch_msg']);
     }
     //web主题切换
     if (isset($_GET['theme']) && !empty($_GET['theme']) && is_dir('./Public/Tpl/' . $_GET['theme'])) {
         cookie('theme', $_GET['theme']);
     }
     if (isset($_GET['theme'])) {
         if (empty($_GET['theme']) or !is_dir('./Public/Tpl/' . $_GET['theme'])) {
             cookie('theme', null);
         }
     }
     $theme = cookie('theme');
     if (!empty($theme)) {
         $GLOBALS['cfg_df_style'] = $theme;
     }
     //网站根路径绝对地址
     $GLOBALS['cfg_cmsurl'] = $GLOBALS['cfg_basehost'] . $GLOBALS['cfg_indexurl'];
     $tplpath = __ROOT__ . '/Public/Tpl/' . $GLOBALS['cfg_df_style'];
     //相对路径
     $ctplpath = './Public/Tpl/' . $GLOBALS['cfg_df_style'];
     if ($GLOBALS['cfg_mobile'] != 1) {
         //移动端自动识别
         $OS = getOS();
         $mode = isset($_GET['mode']) ? $_GET['mode'] : '';
         if (in_array($OS, array('iphone', 'android'))) {
             if ($mode != 'wap') {
                 $Delimiter = empty($_SERVER['QUERY_STRING']) ? '?' : '&';
                 $request_uri = isset($_GET['mode']) ? strtr($_SERVER['REQUEST_URI'], array('&mode=' . $_GET['mode'] => '', '?mode=' . $_GET['mode'] => '')) : $_SERVER['REQUEST_URI'];
                 header('location:' . $request_uri . $Delimiter . 'mode=wap');
             }
         }
         if ($mode == 'wap') {
             $GLOBALS['_parameter'] = '?mode=wap';
             $GLOBALS['_mode'] = 'wap';
             $tplpath = __ROOT__ . '/Public/Wap/' . $GLOBALS['cfg_wap_tpl_default'];
             $ctplpath = './Public/Wap/' . $GLOBALS['cfg_wap_tpl_default'];
         }
     }
     defined('__THEME__') or define('__THEME__', $tplpath);
     C('TMPL_PARSE_STRING.__THEME__', __THEME__);
     C('TMPL_PARSE_STRING.__SEARCH__', url('search'));
     if (file_exists($ctplpath . '/theme.php')) {
         $GLOBALS['_tplvars'] = F('theme', '', $ctplpath . '/');
     }
     //登录判断
     defined('USER_LOGINED') or define('USER_LOGINED', $this->isLogin());
     defined('ADMIN_LOGINED') or define('ADMIN_LOGINED', $this->isAdmin());
 }
开发者ID:google2013,项目名称:pppon,代码行数:60,代码来源:CommonAction.class.php


示例2: start

 /**
  * 显示命令行指令
  */
 static function start($startFunction)
 {
     if (empty(self::$pidFile)) {
         throw new \Exception("require pidFile.");
     }
     $pid_file = self::$pidFile;
     if (is_file($pid_file)) {
         $server_pid = file_get_contents($pid_file);
     } else {
         $server_pid = 0;
     }
     if (!self::$optionKit) {
         self::$optionKit = new GetOptionKit();
     }
     $kit = self::$optionKit;
     foreach (self::$defaultOptions as $k => $v) {
         //解决Windows平台乱码问题
         if (PHP_OS == 'WINNT') {
             $v = iconv('utf-8', 'gbk', $v);
         }
         $kit->add($k, $v);
     }
     global $argv;
     $opt = $kit->parse($argv);
     if (empty($argv[1]) or isset($opt['help'])) {
         goto usage;
     } elseif ($argv[1] == 'reload') {
         if (empty($server_pid)) {
             exit("Server is not running");
         }
         if (self::$beforeReloadCallback) {
             call_user_func(self::$beforeReloadCallback, $opt);
         }
         getOS()->kill($server_pid, SIGUSR1);
         exit;
     } elseif ($argv[1] == 'stop') {
         if (empty($server_pid)) {
             exit("Server is not running\n");
         }
         if (self::$beforeStopCallback) {
             call_user_func(self::$beforeStopCallback, $opt);
         }
         getOS()->kill($server_pid, SIGTERM);
         exit;
     } elseif ($argv[1] == 'start') {
         //已存在ServerPID,并且进程存在
         if (!empty($server_pid) and getOS()->kill($server_pid, 0)) {
             exit("Server is already running.\n");
         }
     } else {
         usage:
         $kit->specs->printOptions("php {$argv[0]} start|stop|reload");
         exit;
     }
     self::$options = $opt;
     $startFunction($opt);
 }
开发者ID:foolkaka,项目名称:soaphp-framework,代码行数:60,代码来源:Server.php


示例3: tfuse_page_options

$header_img = tfuse_page_options('game_header');
?>
       <div class="slider-full">
       
     <ul id="fullslider">
     <li class="slide-item" <?php 
echo !empty($header_img) ? 'style="background-image: url(' . $header_img . ')"' : '';
?>
>
                <div class="slide-content"  ">
                    
                    <div class="ani-item fadeInUp animated">
           				 <div class="play-links">
                    
	                    <?php 
$osType = getOS();
$isAndroid = strcmp($osType, 'Android') == 0 ? true : false;
$isIOS = strcmp($osType, 'iOS') == 0 ? true : false;
$url = tfuse_page_options('android_link');
if (!$isIOS && !(ctype_space($url) || empty($url))) {
    ?>
							 <a class="android-link" href="<?php 
    echo $url;
    ?>
">
							 	<img src="<?php 
    echo tfuse_options('google_play_img');
    ?>
" >
						 	</a>
		 					 
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:30,代码来源:single-game.php


示例4: sec_session_start

include_once "lib/ini.setting.php";
include_once "ini.config.php";
include_once "ini.dbstring.php";
include_once "ini.functions.php";
sec_session_start();
include_once "mod.order.php";
include_once "mod.login.php";
include_once "mod.optional.php";
include_once "ctrl.order.php";
include_once "ctrl.client.php";
include_once "ctrl.login.php";
// check user  authentication
checkSession($_SESSION['sess_user_id']);
checkOrderSession($_SESSION['sess_order_type'], $_SESSION['sess_client']);
$rf = getRf($db);
$os = getOS($db);
$app = getApp($db);
$showclient = getClient($db);
?>
<html lang="en-US">
<head>
    <meta charset="utf-8">
    <link href="<?php 
echo CSS;
?>
import.css" type="text/css" rel="stylesheet"/>
    <link href="<?php 
echo CSS;
?>
style.css" type="text/css" rel="stylesheet"/>
    <script src="<?php 
开发者ID:htareilwin91,项目名称:git_review,代码行数:31,代码来源:clientnew.php


示例5: json_decode

<?php

/**
 * Created by PhpStorm.
 * User: spider-ninja
 * Date: 4/19/16
 * Time: 4:42 PM
 */
$input = json_decode(file_get_contents("php://input"));
$header = json_encode($_SERVER);
$url = $_SERVER['REQUEST_URI'];
$timeTaken = time() - $scriptStartTime;
$os = getOS();
$ip = $_SERVER['REMOTE_ADDR'];
$sql = "INSERT INTO `request_logs`.`raw_logs` (id, input, header, url,time_taken,ip,os)\n\t\t\t\tVALUES (NULL,\n\t\t\t\t\t'" . json_encode($input) . "',\n\t\t\t\t\t'" . $header . "',\n\t\t\t\t\t'" . $url . "',\n\t\t\t\t\t'" . $timeTaken . "',\n\t\t\t\t\t'" . $ip . "',\n\t\t\t\t\t'" . $os . "'\n\t\t\t\t\t);";
$user = mysqli_query($db_handle, $sql);
开发者ID:rajnishp,项目名称:api_bluenet,代码行数:16,代码来源:writeLog.php


示例6: elseif

    if (preg_match('/windows/i', $_SERVER['HTTP_USER_AGENT'])) {
        $os = 'windows';
    } elseif (preg_match('/macintosh|mac os x/i', $_SERVER['HTTP_USER_AGENT'])) {
        $os = 'mac';
    } elseif (preg_match('/ubuntu/i', $_SERVER['HTTP_USER_AGENT'])) {
        $os = 'ubuntu';
    } elseif (preg_match('/debian/i', $_SERVER['HTTP_USER_AGENT'])) {
        $os = 'debian';
    } elseif (preg_match('/archlinux/i', $_SERVER['HTTP_USER_AGENT'])) {
        $os = 'arch';
    } elseif (preg_match('/linux/i', $_SERVER['HTTP_USER_AGENT'])) {
        $os = 'linux' . getArch();
    }
    return $os;
}
$osstring = getOS();
?>
<!DOCTYPE html>
<html>
    <head>
        <!-- meta info -->
        <meta charset="utf-8">
        <title>Nightingale - The tune of life, the tune of yours</title>
        <?php 
include "../static.getnightingale.com/php/head.php";
?>

        <!-- structured data -->
        <script type="application/ld+json">
        {
          "@context": "http://schema.org",
开发者ID:kiplimokitur,项目名称:nightingale-website,代码行数:31,代码来源:index.php


示例7: getBrowserInfo

function getBrowserInfo()
{
    $u_agent = $_SERVER['HTTP_USER_AGENT'];
    $bname = 'Unknown';
    $platform = 'Unknown';
    $version = "";
    //First get the platform?
    if (preg_match('/linux/i', $u_agent)) {
        $platform = 'Linux';
    } elseif (preg_match('/macintosh|mac os x/i', $u_agent)) {
        $platform = 'Mac';
    } elseif (preg_match('/windows|win32/i', $u_agent)) {
        $platform = 'Windows';
    }
    // Next get the name of the useragent yes seperately and for good reason
    if (preg_match('/MSIE/i', $u_agent) && !preg_match('/Opera/i', $u_agent)) {
        $bname = 'Internet Explorer';
        $ub = "MSIE";
    } elseif (preg_match('/Firefox/i', $u_agent)) {
        $bname = 'Mozilla Firefox';
        $ub = "Firefox";
    } elseif (preg_match('/Chrome/i', $u_agent)) {
        $bname = 'Google Chrome';
        $ub = "Chrome";
    } elseif (preg_match('/Safari/i', $u_agent)) {
        $bname = 'Apple Safari';
        $ub = "Safari";
    } elseif (preg_match('/Opera/i', $u_agent)) {
        $bname = 'Opera';
        $ub = "Opera";
    } elseif (preg_match('/Netscape/i', $u_agent)) {
        $bname = 'Netscape';
        $ub = "Netscape";
    } else {
        $bname = 'unkown';
        $ub = "unkown";
    }
    // finally get the correct version number
    $known = array('Version', $ub, 'other');
    $pattern = '#(?<browser>' . join('|', $known) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
    if (!preg_match_all($pattern, $u_agent, $matches)) {
        // we have no matching number just continue
    }
    // see how many we have
    $i = count($matches['browser']);
    if ($i != 1) {
        //we will have two since we are not using 'other' argument yet
        //see if version is before or after the name
        if (strripos($u_agent, "Version") < strripos($u_agent, $ub)) {
            $version = $matches['version'][0];
        } else {
            $version = $matches['version'][1];
        }
    } else {
        $version = $matches['version'][0];
    }
    // check if we have a number
    if ($version == null || $version == "") {
        $version = "?";
    }
    return array('user-agent' => $_SERVER['HTTP_USER_AGENT'], 'browser' => getBrowser($_SERVER['HTTP_USER_AGENT']), 'version' => $version, 'platform' => getOS($_SERVER['HTTP_USER_AGENT']), 'pattern' => $pattern);
}
开发者ID:jrsalunga,项目名称:gi-manager,代码行数:62,代码来源:Helpers.php


示例8: getOS

            $PHP_directive_Objects[$i]->setRecommendedValue(mysql_result($directives, $i, 'recomendedvalue'));
            $PHP_directive_Objects[$i]->setCurrentValue($PHP_directive_Objects[$i]->getCurrentValue($PHP_directive_Objects[$i]->getDirectiveName(), $phpini_path));
            $PHP_directive_Objects[$i]->setDescription(mysql_result($directives, $i, 'description'));
            $PHP_directive_Objects[$i]->setRemark(mysql_result($directives, $i, 'remark'));
            $PHP_directive_Objects[$i]->setPossibleValues("this is an array that comes from values table per each directive");
        }
    }
    ?>
    
    <table cellpadding="0" cellspacing="0">
        <tr> <td align="right"><b>Mode Selected:</b></td> <td><?php 
    echo $mode;
    ?>
</td> </tr>
        <tr> <td align="right"><b>Operating System:</b></td> <td><?php 
    echo getOS();
    ?>
</td> </tr>
        <tr> <td align="right"><b>PHP Version:</b></td> <td><?php 
    echo getPHPVersion();
    ?>
</td> </tr>

    </table>
    <br />
     <form name="changeForm" method="POST" action="change.php">
     <table border="1" cellspacing="0" cellpadding="0" >
         <th bgcolor="white" colspan="7"><h1>PHP Security Configuration Directives for <?php 
    echo $mode;
    ?>
</h1></th>
开发者ID:birhanum,项目名称:SCAAMP,代码行数:31,代码来源:index.php


示例9: dbquery

        if (MEMBER && $userinfo["user_perm"] == "3") {
            return true;
        } else {
            return false;
        }
    }
}
// Update ip+ last activity
if (MEMBER) {
    if ($_SERVER["REMOTE_ADDR"] != $userinfo["user_ip"]) {
        dbquery("UPDATE bg_users SET user_oldip='" . $userinfo["user_ip"] . "' WHERE user_id='" . $userinfo["user_id"] . "'");
        dbquery("UPDATE bg_users SET user_ip='" . $_SERVER["REMOTE_ADDR"] . "' WHERE user_id='" . $userinfo["user_id"] . "'");
    }
    dbquery("UPDATE bg_users SET user_lastactivity='" . time() . "' WHERE user_id='" . $userinfo["user_id"] . "'");
    dbquery("UPDATE bg_users SET user_browser='" . getBrowser() . "' WHERE user_id='" . $userinfo["user_id"] . "'");
    dbquery("UPDATE bg_users SET user_os='" . getOS() . "' WHERE user_id='" . $userinfo["user_id"] . "'");
}
// favorite
function fav($id, $type = "A", $link = "")
{
    if (MEMBER) {
        global $userinfo;
        $favr = dbquery("SELECT * FROM bg_favorite WHERE fav_userid = '" . $userinfo["user_id"] . "' AND fav_type='" . $type . "' AND fav_pageid='" . $id . "'");
        $fav = dbarray($favr);
        $favuser = dbrows($favr);
        if ($favuser != "1") {
            if (isset($_GET['oblubene'])) {
                dbquery("INSERT INTO bg_favorite(fav_userid, fav_pageid, fav_type, fav_time) VALUES('" . $userinfo["user_id"] . "','" . $id . "','" . $type . "', '" . time() . "')");
                if ($link == "") {
                    redirect("/clanok/" . $_GET["id"] . "/" . strip_tags($_GET["n"]));
                } else {
开发者ID:Samuell1,项目名称:desart,代码行数:31,代码来源:settings.php


示例10: eol

function eol($repeat = 1)
{
    $OS = getOS();
    if ($OS === 'WIN') {
        $eol = "\r\n";
    } elseif ($OS === 'MAC') {
        $eol = "\r";
    } else {
        $eol = "\n";
    }
    return str_repeat($eol, $repeat);
}
开发者ID:bytemtek,项目名称:znframework,代码行数:12,代码来源:Preloading.php


示例11: dbescape

 if (isset($_POST['cislo']) && isset($_SESSION['spamkiller']) && $_POST['cislo'] == $_SESSION['spamkiller']) {
     if (isset($_POST['podmienky']) == "1") {
         $user = dbescape(StrTr(strip_tags($_POST["meno"]), "ÁÄČÇĎÉĚËÍŇÓÖŘŠŤÚŮÜÝŽáäčçďéěëíňóöřšťúůüýž ", "AACCDEEEINOORSTUUUYZaaccdeeeinoorstuuuyz-"));
         $email = dbescape(strip_tags($_POST["email"]));
         $pass = md5(md5(md5($_POST["heslo"])));
         $pass2 = md5(md5(md5($_POST["heslo2"])));
         if ($pass == $pass2) {
             $result5 = dbquery("SELECT * FROM bg_users WHERE user_nick='" . $user . "'");
             $result55 = dbquery("SELECT * FROM bg_users WHERE user_email='" . $email . "'");
             $rows5 = dbrows($result5);
             $rows55e = dbrows($result55);
             if ($rows5 == 0 && $rows55e == 0 && $user != "") {
                 if (preg_match("/^[^@]*@[^@]*\\.[^@]*\$/", $email)) {
                     if (strlen($user) >= 4 and strlen($email) >= 4) {
                         if (strlen($pass) >= 6) {
                             dbquery("INSERT INTO bg_users(user_nick, user_password,user_email,user_active,user_datereg,user_lastactivity,user_ip,user_browser,user_os)\n     VALUES('" . $user . "','" . $pass . "','" . $email . "','1','" . time() . "','" . time() . "','" . $_SERVER["REMOTE_ADDR"] . "','" . getBrowser() . "','" . getOS() . "')");
                             echo '<div class="alert alert-success">Registrácia prebehla úspešne. Teraz sa môžete prihlásiť.</div>';
                         } else {
                             echo '<div class="alert alert-warning">Minimálna dĺžka hesla je 6 znakov.</div>';
                         }
                     } else {
                         echo '<div class="alert alert-warning">Minimálna dĺžka mena a emailu sú 4 znaky.</div>';
                     }
                 } else {
                     echo '<div class="alert alert-warning">Prosím zadajte správny email.</div>';
                 }
             } else {
                 echo '<div class="alert alert-danger">Zadané meno alebo email už existuje.</div>';
             }
         } else {
             echo '<div class="alert alert-warning">Heslá sa nezhodujú.</div>';
开发者ID:Samuell1,项目名称:desart,代码行数:31,代码来源:registrovat.php


示例12: mysql_num_rows

        $num_directives = mysql_num_rows($directives);
        for ($i = 0; $i < $num_directives; $i++) {
            $MySQL_directive_objects[$i] = new MySQLDirective();
            $MySQL_directive_objects[$i]->setDirectiveName(mysql_result($directives, $i, 'directivename'));
            $MySQL_directive_objects[$i]->setRecommendedValue(mysql_result($directives, $i, 'recomendedvalue'));
            $MySQL_directive_objects[$i]->setCurrentValue($MySQL_directive_objects[$i]->getCurrentValue($MySQL_directive_objects[$i]->getDirectiveName(), $phpini_path));
            $MySQL_directive_objects[$i]->setDescription(mysql_result($directives, $i, 'description'));
            $MySQL_directive_objects[$i]->setRemark(mysql_result($directives, $i, 'remark'));
            $MySQL_directive_objects[$i]->setPossibleValues("this is an array that comes from values table per each directive");
        }
    }
    ?>
    
    <table cellpadding="0" cellspacing="0">
        <tr> <td align="right"><b>Operating System:</b></td> <td><?php 
    echo " " . getOS();
    ?>
</td> </tr>
        <tr> <td align="right"><b>MySQL Version:</b></td> <td><?php 
    echo " MySQL " . getMySQLversion();
    ?>
</td> </tr>

    </table>
    <br />
     <form name="changeForm" method="POST" action="change.php">
     <table border="1" cellspacing="0" cellpadding="0" >
         <th bgcolor="white" colspan="7"><h1>MySQL Server Security Configuration Details</h1></th>

         <tr bgcolor="white">
开发者ID:birhanum,项目名称:SCAAMP,代码行数:30,代码来源:index.php


示例13: define

<?php

define("_PL_OS_SEP", "/");
if (function_exists('php_uname')) {
    define("_CUR_OS", substr(php_uname(), 0, 7) == "Windows" ? "Win" : "_Nix");
} else {
    define("_CUR_OS", getOS());
}
function getOS()
{
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    $os_platform = "_Nix";
    if (preg_match("/" . 'windows' . "/i", $user_agent)) {
        $os_platform = 'Windows';
    }
    return $os_platform;
}
function checkCurrentOS($_OS)
{
    if (strcmp($_OS, _CUR_OS) == 0) {
        return true;
    }
    return false;
}
function isRelative($_dir)
{
    if (checkCurrentOS("Win")) {
        return preg_match("/^\\w+:/", $_dir) <= 0;
    } else {
        return preg_match("/^\\//", $_dir) <= 0;
    }
开发者ID:Trax2k,项目名称:hostkit,代码行数:31,代码来源:helper.php


示例14: userBrowerInfo

function userBrowerInfo()
{
    $returnArr['OS'] = getOS();
    $returnArr['Browser'] = getBrowse();
    return $returnArr;
}
开发者ID:eappl,项目名称:prototype,代码行数:6,代码来源:global.func.php


示例15: getOS

<?php

##################################################
#                                                #
# getBrowserOS.php by Joe Mottershaw             #
# Cloud Eight - http://www.cloud-eight.com       #
#                                                #
##################################################
// Include getBrowserOS
include 'getBrowserOS.php';
// Assign values to variables
$operatingSystem = getOS();
$browser = getBrowser();
// Output
echo '<strong>Operating System: </strong>' . $operatingSystem . '<br />', '<strong>Browser: </strong>' . $browser;
/*
    Example:
        Operating System: Windows 8
        Browser: Internet Explorer
*/
开发者ID:saikiransripada,项目名称:getBrowserOS,代码行数:20,代码来源:index.php


示例16: write_log

/**
 * Write an error log
 *
 * @param string $msg text to write
 * @param string $file
 * @param string $line
 * @param bool $debug_override
 * @author Mauri Kujala <[email protected]>
 */
function write_log($msg, $file = "", $line = "", $debug_override = false)
{
    global $settings, $system_time;
    if (isset($settings["debug"]) && $settings["debug"] == "true" || $debug_override !== false) {
        // write user info file if not exists
        $lfile = $_SERVER["DOCUMENT_ROOT"] . "/edtb_log_info.txt";
        if (!file_exists($lfile)) {
            $ua = getBrowser();
            $debug_info = "Browser: " . $ua['name'] . " " . $ua['version'] . " (" . $ua['platform'] . ")" . PHP_EOL;
            $debug_info .= "Platform: " . getOS() . PHP_EOL;
            $debug_info .= "Reported as: " . $_SERVER["HTTP_USER_AGENT"] . PHP_EOL;
            $debug_info .= "HTTP_HOST: " . $_SERVER["HTTP_HOST"] . PHP_EOL;
            $debug_info .= "SERVER_SOFTWARE: " . $_SERVER["SERVER_SOFTWARE"] . PHP_EOL;
            $debug_info .= "SERVER_NAME: " . $_SERVER["SERVER_NAME"] . PHP_EOL;
            $debug_info .= "SERVER_ADDR: " . $_SERVER["SERVER_ADDR"] . PHP_EOL;
            $debug_info .= "SERVER_PORT: " . $_SERVER["SERVER_PORT"] . PHP_EOL;
            $debug_info .= "DOCUMENT_ROOT: " . $_SERVER["DOCUMENT_ROOT"] . PHP_EOL;
            file_put_contents($lfile, $debug_info);
        }
        $logfile = $_SERVER["DOCUMENT_ROOT"] . "/edtb_log.txt";
        $fd = fopen($logfile, "a");
        if (isset($file)) {
            $on_line = $line == "" ? "" : " on line " . $line;
            $where = "[" . $file . "" . $on_line . "] ";
        }
        $str = "[" . date("d.m.Y H:i:s", time() + $system_time * 60 * 60) . "]" . $where . $msg;
        fwrite($fd, $str . PHP_EOL);
        fclose($fd);
    }
}
开发者ID:DBnR1,项目名称:EDTB,代码行数:39,代码来源:functions_safe.php


示例17: define

<?php

//database connection
define("DBUSER", "root");
define("DBNAME", "pharmacy_app");
getOS() == 'Ubuntu' ? define("DBPASS", "athlonamd") : define("DBPASS", "");
define("DBHOST", "localhost");
define("BASEURL", "http://localhost/pharmacy_app/backend/");
//define("BASEURL", "http://$_SERVER[HTTP_HOST]/backend/");
/*
define("DBHOST", "localhost");
define("DBUSER", "a92619sb_pharm");
define("DBNAME", "a92619sb_pharm");
define("DBPASS", "and123ros");
define("BASEURL", "http://a92619.sb1.dev.codeanywhere.net/pharmacy_app/");
*/
/**************************************************************************************/
//If the server is not supporting mysqli, echo a message
if (!function_exists('mysqli_init') && !extension_loaded('mysqli')) {
    echo 'We don\'t have mysqli!!!';
    exit;
}
/**************************************************************************************/
//Database Connection
$db = new MysqliDb(DBHOST, DBUSER, DBPASS, DBNAME);
/**************************************************************************************/
function check_for_notifications($msg, $res)
{
    if (isset($_SESSION['result']) && $_SESSION['result'] != '') {
        ?>
		<script type="text/javascript">
开发者ID:arshanam,项目名称:pharmacy_app,代码行数:31,代码来源:required.inc.php


示例18: elseif

    } elseif (eregi('Firefox', $_SERVER['HTTP_USER_AGENT'])) {
        $browser = 'Firefox';
    } elseif (eregi('Konqueror', $_SERVER['HTTP_USER_AGENT'])) {
        $browser = 'Konqueror';
    } elseif (eregi('Safari', $_SERVER['HTTP_USER_AGENT'])) {
        $browser = 'Safari';
    } elseif (eregi('AOL', $_SERVER['HTTP_USER_AGENT'])) {
        $browser = 'AOL Browser';
    } elseif (eregi('links', $_SERVER['HTTP_USER_AGENT']) or eregi('lynx', $_SERVER['HTTP_USER_AGENT']) or eregi('w3m', $_SERVER['HTTP_USER_AGENT'])) {
        $browser = 'Linux Textbrowser';
    } else {
        $browser = 'unknown';
    }
    return $browser;
}
$system = getOS();
$browser = getBrowser();
switch ($system) {
    case 'Macintosh':
        $insertstats['statsSystem'] = 1;
        break;
    case 'Linux':
        $insertstats['statsSystem'] = 2;
        break;
    case 'FreeBSD':
        $insertstats['statsSystem'] = 3;
        break;
    case 'SunOS':
        $insertstats['statsSystem'] = 4;
        break;
    case 'BeOS':
开发者ID:BackupTheBerlios,项目名称:ezems-svn,代码行数:31,代码来源:system.php


示例19: get_ip

<?php

/**
 * Created by PhpStorm.
 * User: anton.vityazev
 * Date: 03.11.2015
 * Time: 17:36
 */
if (isset($_GET['test'])) {
    require_once 'info_getters.php';
    require_once __DIR__ . '/../models/routing_model.php';
    $ip = get_ip();
    $os = getOS($_SERVER['HTTP_USER_AGENT']);
    $browser = getBrowser($_SERVER['HTTP_USER_AGENT']);
    if (!isset($_COOKIE['guid'])) {
        $guid = com_create_guid();
        setcookie('guid', $guid, time() + 86400 * 30, "/");
    } else {
        $guid = $_COOKIE['guid'];
    }
    $referer = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
    $db = new Routing_model();
    $info = $db->get_redirect_info(str_replace('?test', '', "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"));
    if ($info[0]['type'] == 'Ротатор') {
        include 'rotator.php';
    } else {
        header('Location: /landings/lands/' . $info[0]['to']);
    }
}
开发者ID:GiddeonWyeth,项目名称:landings,代码行数:29,代码来源:index.php


示例20: print_r

</a> 									
												
											</td>
										</tr>
									</table><!-- /column 1 -->	
									
									<!-- column 2 -->
									<table align="left" class="column">
										<tr>
											<td>				
																			
												<h5 class=""></h5>												
												<p><strong>
													<?php 
print_r($yourbrowser);
echo ' on ' . getOS();
?>
</strong><br/>
                
											</td>
										</tr>
									</table><!-- /column 2 -->
									
									<span class="clear"></span>	
									
								</td>
							</tr>
						</table><!-- /social & contact -->
						
					</td>
				</tr>
开发者ID:sulthanallaudeen,项目名称:sysaxiom,代码行数:31,代码来源:notificationmail.blade.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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