Two kinds of process management modes of PHP-FPMThe number of PHP-FPM processes can also be divided according to the settings
Dynamic and StaticOf
One is to directly open the specified number of PHP-FPM processes, no longer increase or decrease;
The
The content of this section:
PHP functions Specify default values
In PHP programming, the default value is set for a custom function, and when the user calls the function, the parameter is replaced with a default value if the parameter is not
This section shares the PHP code, the main features:
Gets the physical (MAC) address of the machine card.
Code:
Copy CodeThe code is as follows:
/*** Get the physical (MAC) address of the machine card* Currently supports Win/linux system**/Class
Reads the Excel file data and returns the wrong information
Copy CodeThe code is as follows:
/**
* Import Commodity basic information
*/
Public Function Importproductbasicinfo ($data) {
Include_once ' phpexcel.php ';
Include_once '
Remember the previous PHP file upload to the server need to first use Zend Guard encryption, with APC is not necessary. As seen from Wikipedia, APC will be built into the PHP6, so APC is still worth the learning.
1. Installation extension
In Ubuntu
Code:
Copy CodeThe code is as follows:
/**
* Think of the middle as a fixed length ruler that can slide
*
* Think of $this->_totalshowpages as a fixed length ruler that can slide,
* Then $this->_totalpages is a given length of wood, the ruler in
Need to install extension SHMOP
Locate the PHP installation source files directory
Copy CodeThe code is as follows:
# CD/USR/LOCAL/PHP-5.4.0/EXT/SHMOP
#/usr/local/php/bin/phpize
#./configure--with-php-config=/usr/local/php/bin/php-config
# Make &&
1. Implementation
Copy the Code code as follows:
Yum Install php-mbstring
2. Modify PHP.ini (This step is very important, some lxadmin version can not be automatically modified)Copy the Code code as follows:Echo ' extension=mbstring.so '
php5.3 comes with PHP-FPM
Copy CodeThe code is as follows:
/usr/local/php/etc/php-fpm.conf
PID = Run/php-fpm.pidPID settings, default in the installation directory of Var/run/php-fpm.pid, it is recommended to open
Error_log = Log/php-fpm.logError
1) Create Basecontroller controller to inherit controllers (all operations in the background to inherit Basecontroller):
Add in Basecontroller:
Copy the Code code as follows:Public Function Checklogin () {if (Yii::app ()->authority->islogin () = =
Using PHP to simulate our usual DOS command ping command, the main use of PHP's built-in function exec to call the system's ping command, to achieve the ping command function.
Copy CodeThe code is as follows:
$to _ping= ' www.phpernote.com
1. Add the following configuration to the config.php of Home (the project name you are taking)
Copy the Code code as follows:
Return Array (' Config item ' = ' config value '' lang_switch_on ' + true,//turn on the Language pack feature'
Sometimes when we run the PHP program again, it appears
Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)
The reason for this error: In order to ensure that it is not the cause of the program (such as a dead loop),
QQ through the return of different pictures, to represent online or offline, the icon is also changed, since the picture is different, then, the return of the HTTP header information in the Content-length also must be different, and, color pictures
This article introduces a PHP two-dimensional array with a key name for the group add the instance program, if the data from the database when the large can select SUM (t_value), t_id from the T_table group by t_id, But if you're dealing with a
An alternative to the Parse_url () function seen on the official web site of PHP. The result is similar to the Parse_url () function, and is implemented using a regular. URIs are every resource available on the Web-HTML documents, images, video
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