// Function name: CheckTelephone ($ C_telephone) // determines whether the phone number is a valid phone number. // parameter: $ C_telephone (the phone number to be detected) // return value: boolean value // remarks: none // ------------------------------------------------------ // Function name: CheckTelephone ($ C_telephone)
// For usage: determines whether the phone number is a legitimate phone number.
// Parameter: $ C_telephone (phone number to be detected)
// Return value: Boolean
// Standby Note: None
// Configure //-----------------------------------------------------------------------------------
-------
Function CheckTelephone ($ C_telephone)
{
If (! Ereg ('^ []? [0-9] ([xX-] [0-9]) * $ ', $ C_telephone) return false;
Return true;
}
// Configure //-----------------------------------------------------------------------------------
-------
// Configure //-----------------------------------------------------------------------------------
-------
// Function name: CheckValueBetween ($ N_var, $ N_val1, $ N_val2)
// Usage: determines whether it is a valid value in a certain category.
// Parameter: $ N_var value to be detected
// $ N_var1 upper limit of the value to be detected
// $ N_var2 lower limit of the value to be detected
// Return value: Boolean
// Standby Note: None
// Configure //-----------------------------------------------------------------------------------
-------
Function CheckValueBetween ($ N_var, $ N_val1, $ N_val2)
{
If ($ N_var <$ N_var1 │ $ N_var> $ N_var2)
{
Return false;
}
Return true;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service