Let's talk about parent and self:
Copy CodeThe code is as follows:
/*
* Created by Yinyiniao
*/
Class a{
function __construct () {
The construction method of echo "base Class A"
";
}
}
Class B extends a{
function __construct ()
When it comes to security issues, be aware that you need to ensure that you write secure applications in addition to the actual platform and operating system security issues. When writing a PHP application, apply the following seven habits to ensure
Reference1 "Linux strace Command (Detailed)". txt "sina ebook available for download
2man Strace
a complete usage that is basically generic:Strace-o output.txt-t-tt-e trace=all-p 28979
The above meaning is to trace all system calls (-e Trace=all)
The Define () function defines a constant.The purpose of the Define () function is to define a constant.
Constants is much like variables, except for the following differences:
constants [constant] and variables [variable] have many similarities, so
Introduction to the 1.php release
PHP versions of the difference between the PHP version is generally VC6 and VC9, thread safe and non thread safe, VC6 is legacy Visual Studio 6 compiler,
is compiled with this compiler, VC9 is the Visual Studio
Thinkphp has the effect of debugging running state:
process:0.2463s (load:0.0003s init:0.0010s exec:0.1095s template:0.1355s) | Db:13 Queries 0 writes| Cache:2 gets,0 writes| usemem:415 kb| loadfile:20| callfun:63,1370
Meaning of the
PHP Mt_srand sowing a better random number generator seedMt_srand(PHP 3 >= 3.0.6, PHP 4, PHP 5)
Mt_srand--Sowing a better random number generator seed
description
Copy CodeThe code is as follows:
void Mt_srand (int seed)
Use seed to sow the random
The cookie cannot be stored in an array by default, so the following notation is incorrect.
The error is as follows:Warning:setcookie () expects parameter 2 to is string, array given in
But PHP can parse the array with the same name and the cookie
PHP Optimization for PHP optimization is mainly related to the php.ini in the main parameters of the reasonable adjustment and settings, the following we will look at some of the php.ini in the performance of a large number of parameters should be
1. foreach ()foreach () is the simplest and most efficient way to iterate through the data in an array.
#example1:
Copy CodeThe code is as follows:
$colors = Array (' Red ', ' blue ', ' green ', ' yellow ');
foreach ($colorsas $color) {
echo "Do
PHP MAGIC_QUOTES_GPC is mainly in the Web customer service, its role time is from the request to start, next we will be specific for you to explain how it is used.
AD:What we are going to introduce to you today is the specific use of PHP
Why do I need debugger?
Many PHP programmers debug using Echo, Print_r (), Var_dump (), printf () and so on, in fact, for developers with a richer development experience these are enough, they can often in the process of program execution, By
Smarty Truncate intercept stringIntercepts a length of characters from the beginning of a string, with a default length of 80
Specifies the length of the second argument as the Intercept string
By default, Smarty is truncated to the end of a
What is the user agentThe user agent Chinese name is called "UA", which is a special string header that allows the server to identify the operating system and version, CPU type, browser and version, browser rendering engine, browser language,
Copy CodeThe code is as follows:
$key = $_get[' key ']; Get keywords
$select = $_get[' select ']; Get the Search engine choice
Switch ($select)//jump to a different page depending on the search engine
{
Case "Google"://google
$url =
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