This example describes how PHP detects whether a user is shutting down a browser. Share to everyone for your reference, as follows:
1. Example 1
echo str_repeat ("", +); Ignore_user_abort (true); MyLog (' online '); while (true) { / * * 1,
This article in detail in PHP commonly used magic method to summarize, share to everyone for your reference, the specific content as follows
1, PHP to All "__" method as a magic method, so any custom method can not be "__" startThe overloads
1. View nginx information for Yum
# Yum Info nginx
Loaded plugins:fastestmirrorloading mirror speeds from cached Hostfile * epel:mirrors.yun-idc.comexcluding Packages in G Lobal exclude listfinishedinstalled Packagesname : nginxarch: x8
1 && $ratio _h > 1) {if ($ratio _w $ratio _w? $ratio _h: $ratio _w; Take a large proportion of that value//define a large middle image, the image is equal to the height or width of the target image, and then enlarge the original $inter _w = (
Before on the internet to find a lot of changes to modify the phpcms background path, but all too cumbersome (personal feeling), finally found a relatively simple method of modification, here and everyone to share, hope to learn from each
Custom error is that you can completely control the error and its prompt content
Setting errors are handled by a function of your own definition
set_error_handler('errName');
Set the function and customize the input and record of the
"Title" PHP is_writeable () function has a bug, can not accurately determine whether a directory/file can be written, please write a function to determine whether the directory/file is absolutely writable.
Level Six
"Fix" Below is the
Suppose the relationship between Modela and Modelb is Belongsto.
If you belong to a database connection
So
Public function A () { return$this->belongsto ("Modela") }
If two models belong to a different database
So
Public
# define Nginx running userUser root;# Nginx Process number, set to auto on behalf of Nginx will match itself, generally the number of CPU coresWorker_processes Auto;# Error log path and levelError_log Logs/error.log Notice;# PID File storage
PHP is the most basic operation of the most common operations, PHP built-in a lot of convenient functions for us to use, but the official document translation is sometimes not so good to understand, and some functions usually do not have a lot of
Let PHP prompt for error messages in our way
Function used: Set_error_handler ()GrammarSet_error_handler (error_handler,error_types);ParametersError_function required. Specifies the function to run when an error occurs.Error_types is optional.
Because of the recent development requirements, after the password is MD5 encrypted, it involves the string interception of ciphertext. So I wrote this blog, I hope you support.
The constructed string$str = "AJAFAFPAFFAFDFDFD";echo
Static belongs to the class itself, which is what the instantiated object is all about.
form of Use:
Static $val;static function Func () {}
Invocation form:
Class name:: $val;Class Name:: Func ();
classsta{ Public$temp=123;
Serialization is the conversion of variable data to a string (unlike a type conversion mechanism), which is typically used to store data (files) and then recover in other cases (deserialization)
Serialization:
$val =
In a strongly typed language, a type constraint is a syntactic requirement, that is, when a variable is defined, the type must be specified and the type data can be stored later;
PHP is a weak type, which is characterized by the need not to
If a site is not only HTTP access, but also 443HTTPS access.
To have HTTPS and HTTP coexist, you cannot use SSL on in the configuration file to configure listen 443 SSL;
Instance
Server{
Listen 80;Listen 443 SSL;server_name www.iamle.com;Index
Redis Installation steps:
-----Sometimes long ago installed things, long time no longer reinstall, will forget, just a few days ago I need to install Redis, will not, check some online said, also encountered some problems, so I prevent the next
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