Operation of files in PHP: creating, reading, uploading, editing. PHP has mentioned a number of related functions. 1, ReadFile ()
int ReadFile (String $filename [, bool $use _include_path = False [, resource $context]])
Parameters: filename:
Use of references:
Precede a variable with & and assign it to another variable, which is the reference assignment of the variable
code Example:
";
echo $b;
echo "-----------------";
$b = & $a; The reference to the variable
echo
PHP CURL Analog POST submission data:
function Liansuo_post ($url, $data) {//Analog submit data functions $curl = Curl_ Init (); Start a Curl session curl_setopt ($curl, Curlopt_url, $url); Address to access
PDO (Phpdataobject) is PHP5 new things, PHP6 are coming out of the time, PHP6 only the default use of PDO to process the database, will all the database extension to the PECL, then the default is not our favorite php_ Mysql.dll and so on, then how
PHP parseURL a useful function
parse_url-resolves the URL and returns its constituent parts. Description Array parse_url (string $url)
This function resolves a URL and returns an associative array containing the various components that appear in
A linked list is a logically sequential and orderly data storage structure (discontinuous and unstructured on a physical storage unit). When I was in college, I learned the data structure course of C + +, the first contact is linked list (university
single case mode:
Typically used for database connections and hooks to avoid a large number of new operations
Key, set a flag bit instance, private construction method __construct
Class Dog{Static properties that are used to hold a single instance
Gearman extension installed, wrote a test code test_gearman.php
addserver ();
$worker->addfunction ("reverse", "my_reverse_function");
while ($worker->work ());
function My_reverse_function ($job)
{return
strrev ($job->workload ());
>
$
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 () ..
18th to Sun Moon Lake and Aboriginal culture village played a day. The play itself is very tired, plus is playing large entertainment equipment, such as roller coaster, spacecraft, UFO, pirate ship, Pirates of the Caribbean and so on. In short, the
Encapsulation is one of the three characteristics of the object programming, the encapsulation is to combine the object's attribute and service into a separate same unit, and conceal the internal details of the object as far as possible, including
$data = file_get_contents ("Php://input");
Php://input is a read-only stream that can access the requested raw data. In the case of POST requests, it is best to use php://input instead of $HTTP _raw_post_data because it does not depend on specific
There are several types of PHPHow the various types of PHP are convertedPHP input and output modePHP Type: 4 kinds of scalar types Int,float,string,bool2 types of composite Array object2 special types of resource nullPHP has no underfinedThe
Encapsulation class, in the form of chained operation (encapsulating watermark Picture class is only redundant, but only for testing)
backgroundimg = $backgroundImg;
return $this; /** * Watermark Picture * @param $WaterImg * @return $this *
1. The communication interface has two kinds of data structure XML and JSON, their difference:
Xml
Json
1. Readability
Strong
Weak
2. Generate Data speed
Weak
Strong
3.
PHP is a useful function parse_url, especially convenient for the analysis of information capture, for example, as follows:
$url = "http://www.electrictoolbox.com/php-extract-domain-from-full-url/";
$parts = Parse_url ($url);
Output:
Array
(
[Scheme]
I finally tested it today. Socket communication in PHP, first look at the schematic diagram
Here you can see clearly where the socket is in the network model, as well as the image of the port
We are programmed in this order, please look at the
This problem has been encountered before, remember the last is to download the source package to specify the path, and today the new installation environment results must try, because I know that as long as the installation of this
The include (or require) statement gets all the text/code/markup that exists in the specified file and copies it to the file that uses the include statement.
Include files are useful if you need to refer to the same PHP, HTML, or text on multiple
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