Php obtains and sets the variable type.
Gettype-get variable typeSyntax:String gettype (mixed $ var)The possible value of the returned string is:BooleanIntegerDoubleStringArrayObjectResourceNullUnknown typeNote:Do not use gettype () to test
Understand the scope of variables in php
Understand the scope of a variable
A scope is a range that can be used or visible to a variable in a script. PHP has six basic scope rules:
The built-in Super global variables can be used and visible
Search for PHP code of all links on the page
Function get_links ($ link ){
$ Html = file_get_contents ($ link );
$ Html = str_replace ("\ n", "", $ html );
$ Html = preg_replace ('//', "\ n", $ html );
Beautiful PHP verification code
Class Page {
Private $ total; // total records
Private $ pagesize; // The number of entries displayed on each page
Private $ limit; // limit
Private $ page; // The
Record page execution time php code
Class runtime
{
Var $ StartTime = 0;
Var $ StopTime = 0;
Function get_microtime ()
{
List ($ usec, $ sec) = explode ('', microtime ());
Return
Scheduled Tasks implemented by PHP
Sometimes the program runs automatically to regularly call the interface. There are two methods available from the Internet: 1. the ignore_user_abort () function can be used with set_time_limit (0) and
Php randomly generates a password that is easy to remember
Function random_readable_pwd ($ length = 10 ){
// The wordlist from which the password gets generated
// (Change them as you like)
$ Words = 'Dog,
Php watermarking code for images
When using php programming, you often need to add a watermark to the uploaded image to determine the copyright and source of the image. however, the position of the watermark is usually in the lower-right
Php --- ajax transmits multi-dimensional arrays to the background
Php --- ajax transmits multi-dimensional arrays to the backend. For more information, see.1 traditional: true?? The online data is generally set to true as the ajax parameter
ThinkPHP framework construction
The ThinkPHP framework is built. if you need it, you can refer to it.Set up the controller environment:Define ('app _ path', './Application/') automatically creates an Application folder and stores the
Phpcookie & amp; session note
Php cookie & session note. For more information, see. **COOKIE**1. create a cookieSetcookie (name, value, expire, path, domain); the setcookie function must be in front of the tag;Eg: setcookie (user, "zhuyumin"
Php verification code class based on GD Library (supports Chinese and English fonts, backgrounds, interference points, and distortion .......)
/*
* Captcha Class base on php gd Lib
* @ Author Design
* @
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