During the development of the project, the data of the checkbox in the form submitted to the background by the web is transmitted as an array, but we will encounter the following problems when we use the same interface to transmit data to the
1. Configure in config file
' Mailer ' = [ ' class ' = ' yii\Swiftmailer\mailer ',//server class
' Usefiletransport ' =>false,//This sentence must have, false send message , true just generate mail in the runtime folder, do
Recently developed the public number, learned something new, in this record, but also hope to help others
Public functionresponsemsg() {//$requestStr = $_request[' mpxml '); Off-line test
Sort (): Simple sorting of an array element from low to high, this function can be arranged numerically or alphabetically.
Listing A
$data = array(5,8,1,7,2); sort($data); print_r($data);?>输出结果如下所示:Array ([0] => 1[1] => 2[2] => 5[3] => 7[4
Source: http://www.cnblogs.com/dreamhome/archive/2011/05/04/2037011.html
----------------------------
Require,require_once//require("file.php") is read before the PHP program executesrequireThe specified imported file, if an error occurs, is
Still envy JavaScript can dynamically add methods to the object, PHP is also a way to yo? Then look down!
The most important thing is that the dynamic extension method also supports accessing the object's internal private properties and methods Oh!!
The use of thinkphp official WeChat package, the use of different modes can be successful, but the safe mode is not, now will analyze the results of the record.
Tright
Analyze the problem:
Decryption Server message is always unsuccessful, download
On the Internet to read the requirements of the application of PHP, the small city did ask very high, let me frightened, record, convenient to learn slowly later.
The first small technology company recruit PHP development engineer
Job Description
Taking Yii2 as an example
The process of packaging files is simple, but after packaging, always error:
PHP Fatal error:uncaught yii\base\invalidparamexception:the directory does not exist:phar:///users/jimmy/php/library/
Environment
My environment is eclipse for Php+nginx+xdebug.
Tools
Eclipse for PHP
Xdebug
Specific steps
1. Installing Xdebug
Put the downloaded Xdebug file in the Ext directory of PHP.
Modify PHP.ini
Locate the php.
Original: Faster alternative to PHP ' s Array Unique Function
Overview
Functions that use PHP array_unique() allow you to pass an array and then remove the duplicate values, returning an array with unique values. This function works very well in
The main data structures used by PHP SPL (standard PHP Library) are: Doubly linked list (Spldoublylinkedlis), Stack (splstack), queue (Splqueue), Heap (Splheap), Dagen ( SPLMAXHEAP), small Gan (splminheap), Priority queue (Splpriorityqueue), fixed
exec function Parsing
EXEC syntax: string exec (String command, string [array], int [return_var]);
EXEC return Value: string
EXEC parameter description
command– commands to execute
array– is the output value
The return_var– is a return value of 0
A few XAMPP configuration points to send the e-mail from PHP by using Gmail account,
1, \xampp\sendmail\sendmail.ini
Smtp_server=smtp.gmail.com
smtp_port=587
Auth_username=huilin.xiong@gmail.com (your Gmail account)
Auth_password=your PASSOWRD
2,
Sendfile
Now the popular Web server has the Sendfile option to improve server performance, what exactly is sendfile, how does it affect performance? Sendfile is actually a system call after linux2.0+, and the Web server can decide whether to take
We have this problem when we use the Imggettftext function.
Imagettftext (): ANY2EUCJP (): Invalid code in input string
It's all right. This is a bug in PHP
https://bugs.php.net/bug.php?id=42218
Cause when compiling PHP--enable-gd-jis-conv turn
The Imagick part of the image library developed for the bone system, which supports GIF, perfectly supports trimming, generating thumbnails, and adding watermarks.
Supports generating thumbnail images by orientation, such as:
The upper left
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