Turn from: http://echoright.blog.51cto.com/151903/495578
Recently in the process of writing PHP to find PHP prompts PHP Notice: ........ The words, although this is just PHP hints content, and no big impact, but for security and aesthetic
Scope of a variable
Also known as the scope of a variable, the scope of a variable is the context in which it is defined (also its effective range),
Most PHP variables have only a single range, and this single range span also contains files
First step, open https://www.paypal.com/official website, apply for a PayPal account. Second step, login account, and enter https://developer.paypal.com/developer/accounts/. You can see that you apply for the automatic attachment of two test
The size of the processing picture that is implemented in PHP.
Comments are in the code, just look at the code.This code also applies to viewing a processed picture on a Web page, simply byHead Add header ("Content-type:image/png");To remove the
PHP Object-oriented design principle--single responsibility principle
I. Background
principle of single duty (responsibility principle)There are many classes in a project, if the class does not distinguish between responsibilities, then it will
In various columns and classification settings, the infinite classification is often used, and infinite classification in the order of the time must use recursion, here for a detailed analysis and interpretation.
first, let's take a look at
Find the path to PHP-FPM
Whereis PHP-FPM
If you cannot find it, you can try using:
Find/-name PHP-FPMThe general default path is:
/usr/sbin/php-fpm
modifying php-fpm.conf configuration Files
The default location is:
/private/etc/php-fpm.conf
If it
PHP Curl Cookie Access sample
A lot of people sent messages asking curl to access cookie files, Du Dong didn't think it was a difficult task, because it was easy to see the manual. Here is an example, after reading it all clear:
CURL IP
If you have finished installing PHP, you will find no error when browsing the Web page.
Then you have to modify php.ini to change display_errors = off to display_errors = On
If finished, find the newspaper: Notice:use of undefined constant ....
PHP Tags
When parsing a file, PHP looks for the start and end tags, which is
PHP also allows the use of short tags. And, but not encouraged to use. Short tags can only be used if you activate the Short_open_tag configuration directive in php.ini
PHP image processing get picture resources
Resource Imagecreatefromxxxx (String $filename)Returns an image identifier that represents an image obtained from a given file name. get picture Related information
GetImageSize ()
The function will
"HTTP Access"
Generally we visit HTTP way many, mainly is: curl, Socket, file_get_contents () and other methods.
If you encounter the other server has not been responding, we are tragic, it is easy to kill the entire server, so when accessing HTTP
What is the difference between get and post in PHP and when to use a post to explain
difference:
1, get is generally the data transmitted after the hyperlink, the amount of data transmitted is small, can not be greater than 2KB.
2, post is
Wampserver
According to the version I downloaded, php5.5.12 has been installed by default, as shown below-1
Figure-1
Note the two special documents in Figure 2 below: Phpforapache.ini wampserver.conf
Figure-2 download PHP binary
The second parameter of the PHP date () function is of type int, and if it is a string type, the result becomes 1970-01-01 xx:xx:xx, so how do you turn the two types of time to each other? Check the PHP API, there is a function, it is strtotime () ..
You often see a combination of defined or in some code, such as:
Defined (' MyPath ') or define (' MyPath ', __dir__.) /');
Defined (' MyPath ') | | Define (' MyPath ', __dir__. /');
To analyze, the left defined is used to determine whether a
upload the xlsx file to the workspace and store the data in the database MySQL
Controller Layer
upload.php
Class Upload extends Ci_controller {Public Function __construct (){Parent::__construct ();$this->load->helper (Array (' form ', ' url
Just today yesterday morning when the teacher said a little bit, as to expand and improve it.
2. Operation Stage
2.1 Running Phase Overview
In the runtime, Apache's main job is to handle the user's service requests.
At this stage, Apache abandons
Toggle PHP Version:
Brew Install php-[version]
[Version]=56|70 etc
Brew Unlink php-Previous version
Brew Link php-now version
The appropriate configuration is to manage PHP extensions in/usr/local/etc/php/:
First: Brew Tap homebrew/php
View
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