1.1-php compilation and installation 1. install MySQL (same as the installation method in LAMP)
2. install php
Wget http://cn2.php.net/distributions/php-5.4.37.tar.bz2
Tar jxf php-5.4.37.tar.bz2
Useradd-s/sbin/nologin php-fpm
Cd php-5.4.37
. /
The interface keyword is used to define the php app interface. for example:
Interface video (){
Public function getVideos ();
Public function getCount (); // This is a virtual method.
}
Interface implementation: [all methods in the interface
PHP uses regular expressions to determine whether the time format is Y-m-d. Currently
If (ereg ("^ (19 | 20) \ d {2}-(0? \ D | 1 [012])-(0? \ D | [12] \ d | 3 [01]) $ ", $ sDate ))
This can only be the YYYY-MM-DD format
How can I write it in
PHPTCP persistent connection extension: foolsock is a PHP extension developed to implement TCP persistent connections in RPC communication.
Introduction
Many PHP projects gradually evolve to service as their business grows (especially when there are
How to use php to show this picture http://7xigfd.com1.z0.glb.clouddn.com/wp-content/uploads/2015/08/134.jpg
Function image ($ url, $ referer_url ){
// $ Url = $ this-> input-> get ('URL ');
$ Dir = pathinfo ($ url );
$ Host = $ dir ['dirname'];
How can I perform verification when a user logs on to another computer? I would like to ask you how to implement this function?
Log on to the background as administrator 1 and verify the verification code. after successful login, the system saves
Function overview in PHP
The name of the function is the same as that of other identifiers in PHP. A valid function name must start with a letter or underline followed by a letter, number, or underline.
The function name is case-insensitive, but it
PHP two file operations 1. get all files in the specified directory, including files in subfolders, use recursion
function get_all_file($dir){$files = scandir($dir);foreach($files as $file){if($file == '.' || $file == '..')
Xin Xing analyzes the priority of php variables. because php is a scripting language, excessive flexibility may lead to ambiguity during parsing, in general, we want to avoid such ambiguity. here is a small example. let's take a look at what the
Here we will discuss two PHPCURLCURLOPT parameters: CURLOPT_postfields and CURLOPT_httpheader.
1. CURLOPT_HTTPHEADER: sets an array of content transmitted in the header.
Curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ("Range: Bytes = 0-50 \
PHP import Excel files
Click here to view the Excel file exported by PHP
PHP Excel file import steps:
1. instantiate an excel reading object
2. load an excel file
Load all
Select load
3. Read excel files
Read all
Read data row by row
Interesting PHP code block-the interview classic does not use the built-in PHP inversion function to reverse the string.
// Method 1 $ str = "This is PHP"; $ strArr = explode ('', $ str); $ count = count ($ strArr) -1; for ($ I = $ count; $ I >=0;
Php? Start Tag
Code 1:
Code 2:
I write code 1 as code 2. the project can run normally, but the image upload and playback are ineffective. why?
Reply to discussion (solution)
Space does not belong to image data
Space does not belong
Reading the source code of laravel has found that since the company has been using the yaf framework, at least many projects are based on the yaf framework. I believe that all those who have used yaf can clearly feel that yaf is very simple.
PHP allows the website to perform cross-origin access. if you need to obtain data from different servers (different domain names), you need to use cross-origin HTTP requests.
Cross-origin requests are common on web pages. For example, a webpage
A blank section (#65279 characters?) appears at the top of the HTML page generated by PHP ?) Solution: recently, the ThinkPHP framework is used in the project, and the top of a page is always blank.
As shown in:
It only appears in chrome and
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