當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。