1. Automatic conversionAutomatic conversion, also known as implicit conversion, in many cases, PHP will automatically convert the type of data according to the context environment.
2. Forced ConversionsCasts, also known as display transformations,
First step
I use 163 mailbox to send mail, make an attempt, before trying, need to open 163 mailbox authorization code as shown, please remember your authorization code, will be used in the next step
Second Step
Need to download a class Phpmailer, I
a file function library
1, the ReadFile () function reads the file and writes it to the cache.
Create a new 01.txt, write something
PHP ReadFile
Create a PHP file
2, fopen open the file
The first parameter of the fopen () function
Enter Nginx directory and open nginx.confFor example, the URL of my visit to thinkphp is (TP5 is the directory I created under nginx/html/, called the level Two directory below): Https://192.168.139.128/tp5/index.php?s=index/index/indexPathInfo mode
1.PHP can complete the following three types of work:
(1) Web server-side scripting
This is the most traditional and most important target area of PHP. This work requires the following three points: a PHP parser (CGI or server module), a Web
form.php
Upload:
upload.php
Set the upload file size limit (unit B) $max _size=500000;
Set the file format of the upload file limit $format =array ("Image/jpeg", "Image/gif", "image/png"); File upload directory $dir =dirname (__file_
Extract the properties of SCR, Alt, title, and so on in the picture.
Often with the pictures to deal with, have to use some extract the image of SCR, alt, title, and so on attributes.
PHP Regular expression matches any property in img PHP.
Theory: Object oriented: A way of recognizing or perceiving things (analogy)
object is the result of a class being instantiated
Object (substance, object)
Instantiate object: Assigns a memory space to the current new class and places the
Cd/soft/php-5.5.38/ext/bcmath/soft/php-5.5.38 is the directory to extract the PHP compression package/usr/local/php-5.5.38/bin/phpizeExecuting this command will produce some configure files in the current
class file, mobile_detect.php
[PHP] View Plain copy /** * Mobile Detect Library * ======= ============== * * Motto: "Every business should have a mobile detection script to detect mobile readers " *
Class Mysingleton {protected static $instance;/*** Get a Single Instance object* @return Mysingleton*/public static function getinstance () {if (! isset (self:: $instance)) {Self:: $instance = new self ();}Return self:: $instance;}/***
When using PHP in NGINX+PHP-FPM mode, if the problem of accessing the PHP file with file not found can be solved by the following method
Comment The root out and modify the Fastcgi_param to Script_filename $document _root$fastcgi_script_name;
The syntax for the split function in PHP is: Array split (String $pattern, string $string [, int $limit])
The split () function returns an array of strings, each of which is a substring separated by a regular expression $pattern as a boundary
PHP and Nginx integration
PHP-FPM is also a third-party fastcgi process manager, which is developed as a patch in PHP, also need to compile with the PHP source code when installing, that is to say, PHP-FPM is compiled into the PHP kernel, so it is
Http://www.cnblogs.com/nwf5d/archive/2011/03/29/1999115.html
Problem Description:
[Root@localhost www]#/usr/local/php/bin/php index.php
PHP Fatal error:call to undefined function pcntl_fork() in/home/www/theard/threadprocessmanager.php in line 69
Most of the time we use PHP strings and how the PHP string is made up, this estimate is very few people to understand ~
In fact, the PHP string is a character array, assuming we define a string
?
$string = "Hello World";
/*
This string is
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