Configure to run php in FastCGI mode in Gentoo
Echo "dev-lang/php fpm">/etc/portage/package. use
Emerge-av dev-lang/php
Configuration is very simple, my local version is php5.4, then edit the file/etc/php/fpm-php5.
A php file and folder operation class written by myself (create, delete, move, copy)
/**
* File operations
*
* Example:
* FileUtil: createDir ('a/1/2/3'); create a folder named a/1/2/3
An example of socket programming in php
Error_reporting (E_ALL );
Set_time_limit (0 );
Echo "TCP/IP Connection \ n ";
$ Port = 1935;
$ Ip = "127.0.0.1 ";
/*
+ --------------
Php command line running parameters and applications
Php can be executed on the web page, and the PHP script can be executed in the command line through the php cli (command line interface.Php can be executed on the web page, and the PHP
Learning the closure of PHP5.3: function () use (& amp; $ param)
Function closureCreater (){
$ X = 1;
Return function ($ fun = null) use (& $ x) {// pass the value by reference
Echo"". $ X ++;
Use examples to learn comparison and logical operations of php
Class Test {
Private $ k = 1;
Public function _ get ($ propertyName ){
Return 123;
}
}
$ Obj = new Test ();
Retrieve domain name
I am reading the ecmall core file ecmall. php. I can see that this function is clearly written and I will share it with you.
Function get_domain (){
/* Protocol */
$ Protocol = (isset ($ _ SERVER [
MiniSmarty simple Smarty
Simple smarty helps new users understand smarty because of itcast's speech on smarty 2nd and 3
Class MyMiniSmarty {
Public $ template_dir = "./templates ";
Public $ complie_dir
Examples of extracting all links from HTML using jsoup
Byte-order mark (BOM) is a unified code character ("Zero width, no broken space") located at the code point U + FEFF "). This character is used to indicate its byte order when it is
Comparison of efficiency in generating xml files using php
Private function directWriteXml (& $ data ){
$ Xmltext ='
';
$ Xmltext. ='
';
$ Xmltext. ='
';
Mybatis Database page
I began to love the interface-based method of mybatis.There are actually two changes (based on the demo on the official website ):
Added the paging plug-in, which is easy to use (feeling good ).
Add a
Calculate the interval between Monday and Friday in a year.
// Year
$ Year = date ("Y ");
$ BeninTime = mktime (0, 0, 0, 1, 1, $ year );
$ EndTime = mktime (0, 0, 0, 1, 1, $ year + 1)-
PHP uses CURL to download remote HTML files
It is said that Curl is more efficient than file_get_contents in downloading remote HTML files.
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, $ url );
// Set the
This article describes how to decompress the ZIP file online by using php. Share it with you for your reference. This article describes how to decompress the ZIP file online by using php. Share it with you for your reference. The specific analysis
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