The reason for writing this function is that the session structure of the website is clear: name | s: 4: "tasm"; passwd | s: 6: "111111 "; mode | s: 1: "1", also know the location where the session is stored, and can upload files, so at that time, a
Sort out several methods commonly used in php to process arrays, so that you can learn more. you can run them one by one and get familiar with the use of php arrays. array_shift () removes the first unit of the array and returns the result. This is
Php users may encounter the following problems when looking for a job. 1. use PHP to print the time format of the previous day, which is 22:21:21 (2 points)
2. differences between echo (), print (), and print_r () (3 points)
3. templates that can
Php Chinese processing tool function --- space ---
String GBspace (string) --------- add a space between each text
String GBunspace (string) ------- clear spaces between each text
String clear_space (string) ------- used to clear unnecessary spaces
Sort some common php numeric judgment functions and save them as php files.
Common php numeric judgment functions
// Determine the array
$ Colors = array ("red", "blue", "green ");
If (is_array ($ colors ))
{
Print ("colors is an
It is convenient to make php programs later and you can use them directly. In fact, some good functions are available in some mature cms systems, such as dedecms, Empire cms, and phpcms, both gb2312 and utf8 are supported.
The code is as
Many people think that htmlentities and htmlspecialchars have the same functions and are used to format html code. I used to think so, but today I found this is not the case. The translations saved Med are:
The code is as follows:
'&' (Ampersand)
Share a self-written paging code for "automatically adjusting the page number range ".
The code is as follows:
Function page ($ page, $ total, $ phpfile, $ pagesize = 10, $ pagelen = 7 ){
$ Pagecode = ''; // defines variables and stores HTML
Recently I have been working on an article publishing system, making changes and changes, but it has not been completed yet .... in order to achieve better compatibility, the program involved magic_quotes_gpc. after reading the manual, I found some
Both black friends and programmers need to know '% 23
'And passWord = 'mypass
Id =-1 union select 1, 1
Id =-1 union select char (97), char (97), char (97)
Id = 1 union select 1, 1 from members
Id = 1 union select 1, 1 from admin
Id = 1 union
This script is used to enter a password for the user and determine whether the password is correct. If it is correct, go to the welcome page.
// This script is used to enter a password for the user and determine whether the password is correct.
//
It is relatively simple to implement the login function through ajax + php. this is a simple example, fixed characters, and Ajax can be read from the database in practical applications.
HTML section:
Function postRequest (strURL ){
Var
PHP provides powerful support for XML. It uses an XML "parser" and provides 20 (PHP4) XML parsing functions to support this parser. Below are some of the most common PHP parsing functions. I. small order
HTML is easy to learn and common. common PHP
Use PHP to filter the code that may be used in html to introduce external dangerous content. Sometimes, users must submit html content to enrich the information published by users. of course, some codes that may cause messy page layout are also
Phpmssql several common database paging SQL statements when writing MIS systems and Web applications, we all involve interaction with the database. if there is a large amount of data in the database, retrieving all records at a time takes up a large
How can I determine the encoding of a string? Php has a function: mb_detect_encoding. However, this item requires the mb_string Library, which is not available everywhere. Function is_utf8 ($ string ){
Return preg_match ('% ^ (? :
[\ X09 \ x0A \ x0
Requirement: will intercept a paragraph of text to a certain physical length display, note, to intercept is not the number of bytes of the string, the UFT-8 of the encoding of Chinese characters is 3 bytes or 4 bytes, when displayed, the Chinese
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