当前位置: 首页>>代码示例>>PHP>>正文


PHP function_check函数代码示例

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


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

示例1: switch

EOF;
$html_footer = <<<EOF
<div class="footer">
  <h6><a href="http://www.33hao.com" target="_blank">程序来源于 bbs.33hao.com</a></h6>
</div>
EOF;
require './include/function.php';
if (!in_array($_GET['step'], array(1, 2, 3, 4, 5))) {
    $_GET['step'] = 0;
}
switch ($_GET['step']) {
    case 1:
        require './include/var.php';
        env_check($env_items);
        dirfile_check($dirfile_items);
        function_check($func_items);
        break;
    case 3:
        $install_error = '';
        $install_recover = '';
        $demo_data = file_exists('./data/utf8_add.sql') ? true : false;
        step3($install_error, $install_recover);
        break;
    case 4:
        step4();
        break;
    case 5:
        $sitepath = strtolower(substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')));
        $sitepath = str_replace('/shop/install', "", $sitepath);
        $auto_site_url = strtolower('http://' . $_SERVER['HTTP_HOST'] . $sitepath);
        break;
开发者ID:ff00x0,项目名称:shopnc,代码行数:31,代码来源:index.php

示例2: location_to_latlng

function location_to_latlng($device)
{
    global $config;
    if (function_check('curl_version') !== true) {
        d_echo("Curl support for PHP not enabled\n");
        return false;
    }
    $bad_loc = false;
    $device_location = $device['location'];
    if (!empty($device_location)) {
        $new_device_location = preg_replace("/ /", "+", $device_location);
        // We have a location string for the device.
        $loc = parse_location($device_location);
        if (!is_array($loc)) {
            $loc = dbFetchRow("SELECT `lat`,`lng` FROM `locations` WHERE `location`=? LIMIT 1", array($device_location));
        }
        if (is_array($loc) === false) {
            // Grab data from which ever Geocode service we use.
            switch ($config['geoloc']['engine']) {
                case "google":
                default:
                    d_echo("Google geocode engine being used\n");
                    $api_key = $config['geoloc']['api_key'];
                    if (!empty($api_key)) {
                        d_echo("Use Google API key: {$api_key}\n");
                        $api_url = "https://maps.googleapis.com/maps/api/geocode/json?address={$new_device_location}&key={$api_key}";
                    } else {
                        $api_url = "https://maps.googleapis.com/maps/api/geocode/json?address={$new_device_location}";
                    }
                    break;
            }
            $curl_init = curl_init($api_url);
            set_curl_proxy($curl_init);
            curl_setopt($curl_init, CURLOPT_RETURNTRANSFER, true);
            $data = json_decode(curl_exec($curl_init), true);
            // Parse the data from the specific Geocode services.
            switch ($config['geoloc']['engine']) {
                case "google":
                default:
                    if ($data['status'] == 'OK') {
                        $loc = $data['results'][0]['geometry']['location'];
                    } else {
                        $bad_loc = true;
                    }
                    break;
            }
            if ($bad_loc === true) {
                d_echo("Bad lat / lng received\n");
            } else {
                $loc['timestamp'] = array('NOW()');
                $loc['location'] = $device_location;
                if (dbInsert($loc, 'locations')) {
                    d_echo("Device lat/lng created\n");
                } else {
                    d_echo("Device lat/lng could not be created\n");
                }
            }
        } else {
            d_echo("Using cached lat/lng from other device\n");
        }
    }
}
开发者ID:jcbailey2,项目名称:librenms,代码行数:62,代码来源:functions.inc.php

示例3: intval

$ectemplates->templatesDIR = '';
$step = intval(accept('step', 'R')) ? intval(accept('step', 'R')) : 0;
$ectemplates->assign('step', $step);
$ectemplates->assign('LAN', $LAN);
if ($step == 3) {
    header("Location:../admin/");
}
if (file_exists($installlock)) {
    message($LAN['install_errno_1000'], $LAN['install_errno_1045'], 0, 1);
}
if ($step == 0) {
    $ectemplates->display('step');
} elseif ($step == 1) {
    $ectemplates->assign('cp_items', syscheck($cp_items));
    $ectemplates->assign('dir_items', dircheck($dir_items));
    $ectemplates->assign('func_items', function_check($func_items));
    $ectemplates->display('step');
} elseif ($step == 2) {
    @(include CONFIG);
    $dbclass = intval(accept('dbclass', 'R')) ? intval(accept('dbclass', 'R')) : 0;
    if ($dbclass == 0) {
        $ectemplates->assign('domain', admin_URL);
        $ectemplates->assign('app_items', $func_app);
        $ectemplates->display('step');
    } elseif ($dbclass == 1) {
        $dbhost = accept('dbhost', 'R');
        $dbname = accept('dbname', 'R');
        $dbuser = accept('dbuser', 'R');
        $dbpw = accept('dbpw', 'R');
        $tablepre = accept('tablepre', 'R');
        $username = accept('username', 'R');
开发者ID:qiuai,项目名称:esp_cms,代码行数:31,代码来源:index.php

示例4: show_msg

}
if (empty($method)) {
    show_msg('method_undefined', $method, 0);
}
if (file_exists($lockfile) && $method != 'ext_info') {
    show_msg('install_locked', '', 0);
} elseif (!class_exists('dbstuff')) {
    show_msg('database_nonexistence', '', 0);
}
timezone_set();
$uchidden = getgpc('uchidden');
if ($method == 'show_license') {
    transfer_ucinfo($_POST);
    show_license();
} elseif ($method == 'env_check') {
    VIEW_OFF && function_check($func_items);
    env_check($env_items);
    dirfile_check($dirfile_items);
    show_env_result($env_items, $dirfile_items, $func_items);
} elseif ($method == 'app_reg') {
    @(include ROOT_PATH . CONFIG);
    @(include ROOT_PATH . CONFIG_UC);
    if (!defined('UC_API')) {
        define('UC_API', '');
    }
    if (getgpc('install_ucenter') == 'yes') {
        header("Location: index.php?step=3&install_ucenter=yes");
        die;
    }
    $submit = true;
    $error_msg = array();
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:index.php

示例5: switch

if (file_exists($copyFile)) {
    $cmsinfo = (include_once $copyFile);
    $CMSName = $cmsinfo['CMSNameNo'];
    $CompanyFullName = $cmsinfo['CompanyFullName'];
    $CompanyUrl = $cmsinfo['CompanyUrl'];
}
switch ($Step) {
    case '1':
        //第一步:检查系统配置
        //name项目, r系统所需配置, b最佳配置, current当前配置
        $cp_items = array(0 => array('name' => '操作系统', 'list' => 'os', 'c' => 'PHP_OS', 'r' => '不限', 'b' => 'Linux'), 1 => array('name' => 'PHP', 'list' => 'php', 'c' => 'PHP_VERSION', 'r' => '5.2', 'b' => '5.2'), 2 => array('name' => '上传配置', 'list' => 'upload', 'r' => '不限', 'b' => '5M'), 3 => array('name' => 'GD库', 'list' => 'gdversion', 'r' => '2.0', 'b' => '2.0'), 4 => array('name' => '磁盘空间', 'list' => 'disk', 'r' => '20M', 'b' => '不限'));
        $dir_items = array(0 => array('type' => 'file', 'path' => '../Upload/'), 1 => array('type' => 'file', 'path' => '../App/Conf'), 2 => array('type' => 'file', 'path' => '../App/Runtime'));
        $func_items = array(0 => array('name' => 'mysql_connect'), 1 => array('name' => 'mb_strlen'), 2 => array('name' => 'fsockopen'), 3 => array('name' => 'xml_parser_create'), 4 => array('name' => 'simplexml_load_file'));
        $SystemInfo = syscheck($cp_items);
        $DirInfo = dircheck($dir_items);
        $FunctionInfo = function_check($func_items);
        include_once "./Tpl/step1.html";
        ob_flush();
        flush();
        foreach ($DirInfo as $d) {
            if ($d['status'] != 1) {
                echo '<script type="text/javascript">DisableNext();</script>';
                ob_flush();
                flush();
                break;
            }
        }
        //函数有效性检查
        foreach ($FunctionInfo as $s) {
            if ($s['status'] != true) {
                echo '<script type="text/javascript">DisableNext();</script>';
开发者ID:project-store,项目名称:phpsite,代码行数:31,代码来源:index.php


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