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
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.
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
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
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
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,
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:
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