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
Functions in PHP
Functions, because PHP is a weakly typed language, this not only makes PHP variables unique, but also makes PHP functions unique.The way functions are declared in PHP is simple:function fcuntion_name ([parameter list]){}Functions
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
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
These days in the process of doing a project, just need to use the CLI in thinkphp to run a controller in the method, in the official manual to find, found, do not know how to use:
Confused, has been Baidu TP5 how to use the CLI implementation
PHP Tutorials: http://www.w3school.com.cn/php/
PHP is a powerful server-side scripting language for creating dynamic interactive sites.
PHP is free and widely used. For competitors like Microsoft ASP, PHP is certainly another high efficiency
1.file_get_contents
PHP code
Copy code code as follows:
$url = "Http://www.jb51.net";
$contents = file_get_contents ($url);
If there is a Chinese garbled use the following code
$getcontent = Iconv ("gb2312", "Utf-8", $contents);
Echo $contents;
?
The demo code is as follows:
A. Form page
insert title hereName:Age:Email:Password:
Two data processing pages
Header ("content-type:text/html; CHARSET=GBK ");$username =$_post[' username '];if (!isset ($_post["send") | | | $_post["send"]!= ' commit '
The importance of design patterns in object-oriented objects.
More in-depth understanding of object-oriented thinking, is conducive to the development of highly scalable programs. There is a "closing principle" in the PHP object-oriented: "Software
$Y = 2016;//Acquisition Year, example, the real environment from the front-end to obtain data $m = 8;//Get the month, example, the real environment from the front-end to obtain data $month = $Y. " -". $m//Current year $month _start = Strtotime
About PHP Realpath and dirname many times will be merged to use, has not been remembered, in need of time to go to the Internet to check data, so record here, easy to find later
DirName returns the directory portion of the path parameter (that is,
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
PHP Development Web pages need to be stored in the Wamp root directory in the WWW folder to run successfully. At the same time Wamp to be in the running state.
Open mode without site:
Enter in the URL field: localhost/file name
1 Code Specification:
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]
Although always use Git to do version management, has used the deployment of GIT projects, but did not adhere to this habit, so many times or directly upload files to the server. Know that this is not a good habit. So the way and the steps of Git
/** * _code () is a validation code function * @access public * @param int $_width Indicates the length of the verification code * @param int $_height represents the height of the verification code * @param int $_rnd_ Code indicates the number of
The signature and verification of a Certificate are often used when docking interfaces with third parties, for identity verification and to prevent data tampering. The process of verifying the signature of a digital certificate in a PFX format 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