But we know that object-oriented has three main features: inheritance, polymorphism, and encapsulation.
1. Inheritance
We continue with the example in the previous section, in PHP, where inheritance is the same as Java, using the extends keyword.
MySQL Workbench
MySQL Workbench is a cross-platform, Visual Database tool developed by MySQL. It has been an attractive alternative to DBDESIGNER4 engineering. MySQL Workbench can be used as the original GUI tool on Windows, Linux and OS X systems,
A simple template engine was used in a project of the time, but it was also a template engine for reference to Discuz, and it was simple to compile some custom tags into PHP code. Already said is very simple, so the compile time is also famous for
How to use: (Run at the command line)
Copy CodeThe code is as follows:
PHP compactor.php destination.php source.php
Download: compactor.php
Copy CodeThe code is as follows:
#!/usr/bin/env PHP
/**
* Compact PHP code.
*
* Strip comments, combine
First of all, \n,\r,\t.
\ n Soft return:
Show line breaks in Windows and go back to the beginning of the next line
In Linux, Unix only represents line breaks, but does not go back to the beginning of the next line.
\ r Soft Space:
In Linux, Unix
It is common to verify the data to be written before it is written to the database, avoiding more serious security issues such as generic SQL injection attacks.
Mayfish can flexibly customize the validation rules for the data content that will be
Hidden danger One: If the client machine's cookie is disabled by the virus, then the session will be the equivalent of No.
Hidden Danger Two: The session in PHP default is in the form of files stored in a temporary folder, for a small system, it is
1. Improve the efficiency of PHP operation
One of the advantages of PHP is that it is fast and is sufficient for general website applications. However, if your site has high traffic, narrow, or other factors that make the server performance
system Functions
Description: Executes external program and displays output data.
Syntax: string system (String command, int [Return_var]);
return value: String
Detailed Description:
This function is like the function system () in C, which
getimagesize-Get image size
Description
Array getimagesize (string $filename [, Array & $imageinfo])
The getimagesize () function will determine any GIF,JPG,PNG,SWF,SWC,PSD,TIFF,BMP,IFF,JP2,JPX,JB2,JPC,XBM or WBMP The size of the image file and
1. Sys_getloadavg ()
SYS_GETLOADAVT () can obtain the system load condition. The function returns an array of three elements, each representing the average load for the system in the past 1, 5, and 15 minutes.
Instead of letting the server down
Example: (Simplified > Complex) bakery > Bread (ZH-TW) Laos > Old Laos (ZH-HK) China Life > Chinese Longevity (zh-hk) ronaldo > lang (zh-hk) (Complex > Simple) memory > Ram (ZH-CN) Fabric > Bush (ZH-CN) Information Library > database (ZH-CN) how to
How do I create a cookie?
The Setcookie () function is used to set cookies.
Note: the Setcookie () function must be located in theLabel before.
Create your first PHP cookie
When you create a cookie that uses a function Setcookie, you must specify
First of all, in the literal sense, none-thread safe is non-thread-safe, do not thread security at execution time, thread safe is threaded, thread security is performed, to prevent new requirements to start a new thread of CGI The execution method
To achieve GZIP compression page requires browser and server co-support, in fact, the server compression, uploaded to the browser after the browser decompression and parsing. There is no need for us to worry about the browser because most browsers
PHP with its ease of use is quickly promoted, but not easy to use it does not mean that it can be used, in fact, many programmers use it very easy to set up a Web application system, but how many people carefully consider their code, is easy to
Values to be judged.
Very simple, give an example.
method One:
Copy CodeThe code is as follows:
$sql = "SELECT * Form ABC"
$result = mysql_query ($sql);
$row = Mysql_fetch_array ($result);
if (empty ($row))//Start judging is enough empty
{
echo
Constructing a SQL statement is a comparison.
Copy CodeThe code is as follows:
$sql = ' SELECT *
From Sdb_comments
WHERE goods_id = '. Intval ($goods _id). '
and for_comment_id is NULL
and object_type = ". $item."
and disabled= "false"
and display =
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