Open PHP.ini,
Remove "; Extension=php_openssl.dll" before the semicolon.
Remove "; Extension=php_mcrypt.dll" before the semicolon
After restarting Apache also saw in the Apache log read Apache error log: Prompt "Cannot load XXX dynamic Library"
1,session.use_cookie = 1
Whether to pass the session ID value using a cookie method. The default is 1, which means enable.
2,session.name = Phpsessid
Whether the cookie passes the sessioin_id or the Get method passes the session_id, you need to
Aha, finally use PHP to achieve the login and registration pull, but the problem again, require Ajax and PHP combined to achieve registration register hood cleaning
PHP Login Source:
The following is the chklogin.php page code:
Session_Start
1, use PHP to write a simple query to find all the names of "John" content and print out
Table name User
Name Tel Content Date
313,333,663,366 College graduate 2006-10-11
313,612,312,331 Graduate 2006-10-15
Zhang Four 021-55665566 secondary school
1. Object-oriented concepts2. What is a class, what is an object, the relationship between a class and an object3. What is Object oriented programming?4. How do I abstract a class?5. How do I instantiate an object?6. How to use the members of the
Http://www.phpweblog.net/young40/archive/2007/11/21/2365.html
Generally, there is a one-to-many relationship between a class and an object (an instance of a class). But in some cases, we onlyAn instance of a class is required. For example, the
When the form is submitted to the browser after the initial processing, upload to the php form processing page.
The average book is either to automatically assign variables to form elements, or to save the submitted data in a global array, and then
The recent study of PHP multithreading problem, found that the poor Chinese resources, only a few articles have been turned and turned, but the content is limited in value. Search process found a lot of foreign websites cited a good article written,
When the PHP program is abnormal, such as a fatal error, timeout, or an unknown logic error causes the program to interrupt, this time can use Register_shutdown_function for exception handling.
For example, to determine whether a script is
The sample code is as follows, which can be used for collection, The code is as follows:Copy code 1. Get the page title// Extract the titlePreg_match ('/ (? .*?) /I ', $ html, $ titleArr );$ Title = $ titleArr ['title'];2. Obtain the body
Example The code is as follows:Copy code $ Preg = "/ /I ";Preg_match_all ($ preg, $ str, $ res ); This is much more useful. No matter what code structure, the image path can be matched smoothly.Example The code is as follows:Copy code $ Str
Delete Chinese characters using php regular expressions The code is as follows:Copy code /* Convert to UTF8 for further processing */$ A = mb_convert_encoding ($ a, 'utf-8', 'gb2312 ');$ A = preg_replace ("/[x {4e00}-x {9fff}]/u", "", $ ); /*
Example: letters, numbers, and Chinese characters The code is as follows:Copy code If (preg_match ("/['.,:;*?~ '! @ # $ % ^ & + =) (<>{}] | [|/| \ | "|/", $ User )){Echo 'Do not enclose some special characters in the name. Please only use
In recent days, it has been a struggle for Chinese character verification. baidu, google, Nima, found all [u4e00-u9fa5] + $. this is wrong. I cannot verify it. this verification can only be performed in the case of UTF-8 encoding. after trying for N
1. The strange strtok function can break down the string according to the specified parameter. Each part is equivalent to a pointer and must be fully executed in conjunction with the loop statement. Note that the first parameter only needs to be
Example The code is as follows:Copy code $ A = "//si ";$ Keyword = preg_replace ($ a, '', $ _ POST ['searchword']); Other methods The code is as follows:Copy code $ Title = " ";$ Title = strip_tags ($ title );If (preg_match ('/ | | /', $
Any characters 6 to 16 are. {6, 16}Only numbers, letters, and underscores are composed of [0-9_a-zA-Z]Add the total to pepper ^ [_ 0-9a-z] {6, 16} $ The code is as follows:Copy code Function ispassword ($ str ){If (preg_match ('/^ [_ 0-9a-z] {6,
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