Let's look at the code. It's a very simple PHP class.Copy codeThe Code is as follows:$ IDCard = new IDCard ();Var_dump ($ IDCard: isCard ($ _ GET ['Card ']);/*** ID card processing*/Class IDCard {// Check whether the ID card is correctPublic static
Ask a string to intercept the problem
Which Master has the time to help me to see a function, get half a day not
PHP Code
{ Array_pop ($tmp _array); $str = Implode (",", $tmp _array); if (strlen ($STR) >30)
[CPP]View Plaincopy print?
#include
void Main ()
{
int l=-1;
unsigned int c=135;
printf ("%u\n", l+c);
}
The result of this is 134, instead of the large positive number I thought before, it is actually
However, in the case of mixing English with Chinese characters, the following problems arise:
If there is such a string
$str = "This is a string";
To intercept the first 10 characters of the string, use the
if (strlen ($STR) >10) $str =substr ($STR,
※checkmoney ($C _money) checks whether the data is in 99999.99 format
※CHECKEMAILADDR ($C _mailaddr) to determine if it is a valid mailing address
※CHECKWEBADDR ($C _weburl) to determine whether it is a valid URL
※checkempty ($C _char) to determine
Class Email {
---set global variables
var $mailTo = ""; Recipient
var $mailCC = ""; Cc
var $mailBCC = ""; Secret CC
var $mailFrom = ""; Sender
var $mailSubject = ""; Theme
var $mailText = ""; Letter Body in text format
var $mailHTML = ""; Letter
We all know that security is important, but the trend in the industry is to add security until the last minute. Since it's not possible to completely protect a Web application, why bother? Wrong. There are a few simple steps you can take to make
"Warning": please do not change without permission
"FileName": c_check.inc
"Role": a set of common detection functions
"Author": Sky Ash
"Last Modified Date": 2001/05/11[cxx]
"Variable definition rule": ' C_ ' = character type, ' i_ ' = integral
We recommend that you send PHP emails with complete functions. PHP -- The following functions are very powerful: not only can emails in html format be sent, but can also be used to send attachments: Copy the code as follows :? Include "email. class"
PHP class-a full-featured mail class we have already introduced a class for group Mail, which can only send text emails, which of the following functions is very powerful? can I send html-format emails and attachments? PhpclassEmail {--- set the
PHP provides a full range of email sending functions. Copy the code as follows :? PhpclassEmail {--- set the global variable var $ mailTo; recipient var $ mailCC; CC var $ mailBCC; secretly CC var $ mailFrom
The code is as follows:
Class Email {/
I just got in touch with PHP. Now I have learned a simple blog from "no basic learning PHP" compiled by Chen Hao. After I typed the code, I found that an error occurred during execution, when I enter the title and content for submission, click to
We introduced here that the ID card number must be a simple one that does not determine whether the ID card number is valid or exists. It only meets some standards. Let's look at the two instances below. We introduced here that the ID card number
This is a class that has been written in the class package,Two other table partitions are required:1. http://www.jerry.com.tw/php/big5.map2. http://www.jerry.com.tw/php/gb.mapThe program is as follows: CCharset. php3// Programmer: Magic Jerry////
PHP checks the ID number of two functions. Here we have introduced that the ID card number must be a simple one and cannot judge whether the ID card number is legal or exists. it only meets some standards, let's take a look at the two instances.
In the past, I tried to verify my ID card. we often used regular expressions to determine if the user entered a full number of 15 or 18 digits and then determined whether the ID card was valid. this method is only the most basic method, the ID card
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.