本文整理匯總了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) {
示例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 '錯誤';
}
示例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) {