Example
The easiest way to use PHP's own Htmlspecialchars function is to convert character content into HTML entities
The code is as follows
Copy Code
if (isset ($_post[' name ')) {$str = Trim ($_post[' name ')); Clean
Installing and configuring PHP
/software/php-3.0.14-win32.zip
Installed in C:PHP3
Configuration: Copy c:php3php3.ini-inst file as Php3.ini and modify
Set the Apache server's home directory Doc_root=c:apachehtdocs
Extension_dir=c:php3
Take Php3.ini
Data
CREATE TABLE IF not EXISTS ' Leo_user ' (' id ' int (one) not NULL auto_increment,' Name ' char (not NULL),' Birthday ' date not NULL,' Email ' char ' not NULL,' Sex ' enum (' M ', ' F ', '-') not NULL,PRIMARY KEY (' id '),UNIQUE KEY ' email '
Recently, one of the requirements was to use PHP to get a few weeks of a year and a weekly start date and contact date. Find some information on the Internet is not appropriate, so I made a copy, the following two ways to achieve PHP acquisition of
This article describes the way PHP gets the date of the website Baidu snapshot. Share to everyone for your reference. as follows:
Online demo _php get snapshot time for a Web site query site snapshot date: input URL: http://" >
This article describes the PHP implementation of QQ space to get the user name of the current user and generate a picture of the method. Share to everyone for your reference. Specifically as follows:
Recently found that the space is often
The example in this article describes how PHP implements caching based on file storage. Share to everyone for your reference. as follows:
In some database data record is big, but the server is limited, may a MySQL query will be good hundreds of
Many Web sites support top and step functionality to show users ' satisfaction with the current page content. Below we give the site to use the top, step function of the full foreground implementation code, in order to facilitate the user reference.
PHP is a dynamic interactive site to create a server-side scripting language, advantages: PHP scripting language widely used, open source free, the most important thing is easy to get started, easy to master.
PHP can generate dynamic page content
This article illustrates the PHP+HTML5 method based on WebSocket to realize the chat room. Share to everyone for your reference. as follows:
HTML5 WebSocket realize two-way communication, toss a few days to get a chat room, share to everyone
1, do not write comments2. Do not use IDE tools to improve productivity3. Do not use version control4, does not follow the programming specification writes the Code5, do not use a unified approach6. Do not think and plan before coding7. Do not
From the beginning of ASP to PHP, I feel that one of the powerful PHP is the rich built-in functions, such as the previous study of PHP date and time function, read and write the relevant functions of the file are all show that PHP more professional,
Always wanted to understand the technology of web programming. PHP is a language that is important for web programming, and it always says that PHP is a programming language for the server side. However, it is impossible to understand how it is used
PHP a file to handle the micro-JSSDK configuration:
Includes caching, including HTTPS communications, getting micro-letter access_token, signatures, and everything. But defensive programming is less, commercial use, need to improve the code.
Use
Some of the SQL statements are written in this way:
' SELECT ID from dbname WHERE xx_id =%d; ', $bl [' student_id ']
where the "xx_id =%d", where%d refers to a decimal number (d meaning is the meaning of decimal decimal), the content of the
How can I change the default cache time of memcached ?, Memcached Cache
When we use the memcached extension of php to add data to memcached, there are two methods for data validity. For example.
AsSet a UNIX timestamp or an integer in seconds
Php cookie User Logon details and instance code, cookie User Logon
Php cookie User Login implementation
HTML source code:
php cookie User Logon implementation Please Specify the Password Customer ID Password
Html page The code is as follows:Copy code note the top_a1 ID. Js code The code is as follows:Copy code Function AD (id, did){ $. Post ("ajax. php", {"aid": id}, function (data ){If (data = '') // 0 { }Else { Optional (did)
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