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


PHP isfun1函数代码示例

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


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

示例1: print_r

    print_r($arr);
    echo "</pre>";
    exit;
}
//MySQL檢測
if ($_POST['act'] == 'MySQL檢測') {
    $host = isset($_POST['host']) ? trim($_POST['host']) : '';
    $port = isset($_POST['port']) ? (int) $_POST['port'] : '';
    $login = isset($_POST['login']) ? trim($_POST['login']) : '';
    $password = isset($_POST['password']) ? trim($_POST['password']) : '';
    $host = preg_match('~[^a-z0-9\\-\\.]+~i', $host) ? '' : $host;
    $port = intval($port) ? intval($port) : '';
    $login = preg_match('~[^a-z0-9\\_\\-]+~i', $login) ? '' : htmlspecialchars($login);
    $password = is_string($password) ? htmlspecialchars($password) : '';
} elseif ($_POST['act'] == '函式檢測') {
    $funRe = "函式" . $_POST['funName'] . "支援狀況檢測結果:" . isfun1($_POST['funName']);
} elseif ($_POST['act'] == '郵件檢測') {
    $mailRe = "郵件傳送檢測結果:傳送";
    if ($_SERVER['SERVER_PORT'] == 80) {
        $mailContent = "http://" . $_SERVER['SERVER_NAME'] . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
    } else {
        $mailContent = "http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
    }
    $mailRe .= false !== @mail($_POST["mailAdd"], $mailContent, "This is a test mail!") ? "完成" : "失敗";
}
//網路速度測試
if (isset($_POST['speed'])) {
    $speed = round(100 / ($_POST['speed'] / 1000), 2);
} elseif ($_GET['speed'] == "0") {
    $speed = 6666.67;
} elseif (isset($_GET['speed']) and $_GET['speed'] > 0) {
开发者ID:qiuai,项目名称:Yahei-PHP-Prober-Chinese-Traditional,代码行数:31,代码来源:tz_tw.php

示例2: print_r

    print_r($arr);
    echo "</pre>";
    exit;
}
//MySQL检测
if ($_POST['act'] == 'MySQL检测') {
    $host = isset($_POST['host']) ? trim($_POST['host']) : '';
    $port = isset($_POST['port']) ? (int) $_POST['port'] : '';
    $login = isset($_POST['login']) ? trim($_POST['login']) : '';
    $password = isset($_POST['password']) ? trim($_POST['password']) : '';
    $host = preg_match('~[^a-z0-9\\-\\.]+~i', $host) ? '' : $host;
    $port = intval($port) ? intval($port) : '';
    $login = preg_match('~[^a-z0-9\\_\\-]+~i', $login) ? '' : htmlspecialchars($login);
    $password = is_string($password) ? htmlspecialchars($password) : '';
} elseif ($_POST['act'] == '函数检测') {
    $funRe = "函数" . $_POST['funName'] . "支持状况检测结果:" . isfun1($_POST['funName']);
} elseif ($_POST['act'] == '邮件检测') {
    $mailRe = "邮件发送检测结果:发送";
    if ($_SERVER['SERVER_PORT'] == 80) {
        $mailContent = "http://" . $_SERVER['SERVER_NAME'] . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
    } else {
        $mailContent = "http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
    }
    $mailRe .= false !== @mail($_POST["mailAdd"], $mailContent, "This is a test mail!\n\nhttp://lnmp.org") ? "完成" : "失败";
}
// 检测函数支持
function isfun($funName = '')
{
    if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\\_]+~i', $funName, $tmp)) {
        return '错误';
    }
开发者ID:yunkaiyueming,项目名称:php_lib_code_center,代码行数:31,代码来源:PhpEnvDetectInfo.php

示例3: print_r

    print_r($arr);
    echo "</pre>";
    exit;
}
//MySQL检测
if ($_POST['act'] == 'MySQL Test') {
    $host = isset($_POST['host']) ? trim($_POST['host']) : '';
    $port = isset($_POST['port']) ? (int) $_POST['port'] : '';
    $login = isset($_POST['login']) ? trim($_POST['login']) : '';
    $password = isset($_POST['password']) ? trim($_POST['password']) : '';
    $host = preg_match('~[^a-z0-9\\-\\.]+~i', $host) ? '' : $host;
    $port = intval($port) ? intval($port) : '';
    $login = preg_match('~[^a-z0-9\\_\\-]+~i', $login) ? '' : htmlspecialchars($login);
    $password = is_string($password) ? htmlspecialchars($password) : '';
} elseif ($_POST['act'] == 'Function Test') {
    $funRe = "Function" . $_POST['funName'] . "Test results support the position: " . isfun1($_POST['funName']);
} elseif ($_POST['act'] == 'Mail Test') {
    $mailRe = "Mail test results: send";
    if ($_SERVER['SERVER_PORT'] == 80) {
        $mailContent = "http://" . $_SERVER['SERVER_NAME'] . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
    } else {
        $mailContent = "http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
    }
    $mailRe .= false !== @mail($_POST["mailAdd"], $mailContent, "This is a test mail!") ? "Complete" : "Failure";
}
//网络速度测试
if (isset($_POST['speed'])) {
    $speed = round(100 / ($_POST['speed'] / 1000), 2);
} elseif ($_GET['speed'] == "0") {
    $speed = 6666.67;
} elseif (isset($_GET['speed']) and $_GET['speed'] > 0) {
开发者ID:edwarts,项目名称:hongfengweb,代码行数:31,代码来源:proberv.php


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