Examples of Use of PHP Boolean (Boolean) types

/** * Detection of Boolean Boolean types in PHP * edit:bbs.it-home.org */ Var_dump ((BOOL) ""); BOOL (FALSE) Var_dump ((bool) 1); BOOL (TRUE) Var_dump ((BOOL)-2); BOOL (TRUE) Var_dump ((bool) "foo"); BOOL

How PHP determines whether it is a number or a character type

This article describes how to determine whether a number, or a character type, is a method in PHP programming. Refer to a friend who needs it.First, PHP is verifying that the string is a number. Method one: In PHP with regular validation is a number,

Introduction to PHP Case conversion functions (Strtolower, Strtoupper) usage

This article describes the use of Strtolower and Strtoupper in PHP for case conversion functions, which are often encountered in character handling issues. If you need a friend, refer to it.1, convert the string to the lowercase strtolower function:

PHP keyword substitution classes (avoid duplicate substitutions, keep and restore original links)

/* * Keyword Matching class * @author YLX * @packet Mipang * Usage Examples * $str = "green shell layer with Edwin van der Sar next year, next year 1 of the spill room Lucas neighbourhoods"; * $key = new

PHP Getting Started Tutorials (21) PHP date and time functions

echo Time (); Return "1264668961" ?> Copy Code2,date ()The date () function is required to convert the UNIX timestamp to the current time that can be read.The prototype of the date function is as follows:

Analysis of the difference between PHP strip_tags and htmlspecialchars for HTML markup removal

This article introduces the two functions of removing HTML tags in PHP, the difference between Strip_tags and Htmlspecialchars. Useful to friends, may wish to refer to the next.First, look at the Strip_tags function.  Remove the HTML and PHP

PHP Filter HTML tag attribute class (with source)

/** HTML Attribute Filter * Date:2013-09-22 * Author:fdipzone * ver:1.0 * edit:bbs.it-home.org * Func: * Public Strip Filter Properties * Public Setallow setting allowed properties * Public SetException Set

PHP implementation of the file directory operation class

/** * File directory Operation class * Editor: Bbs.it-home.org Example * $fileutil = new Filedirutil (); * $fileutil->createdir (' A/1/2/3 '); Test build folder Build a A/1/2/3 folder * $fileutil->createfile (' B/1/2/3 '

PHP recursively gets the code for the files in the directory (including subdirectories)

/** * Recursively get files in directories and subdirectories * by bbs.it-home.org */ function Readfilefromdir ($dir) { if (!is_dir ($dir)) { return false; } Open Directory $handle =

PHP receives post data and parses a simple instance of JSON

in this article, PHP receives the data from post, and parses an example of JSON, for everyone to learn the reference. PHP receives the post data, parses the JSON code, uses PHP functions--stripslashes, Json_decode, Var_dump: Code Description:

PHP Query Web site PR value of the implementation code

ord

/* * Function: Encode the URL * Parameter description: $web _url website URL, does not contain "http://" * site:bbs.it-home.org */ function Hashurl ($url) { $SEED = "Mining PageRank is against GOOGLE's TERMS of

PHP Cookie Class (set, GET, delete cookie value)

This article describes a powerful PHP cookie operation class, you can set a cookie, get cookie value, delete the cookie value and other operations, the need to refer to a friend.Share a PHP cookie action class that can set cookies, get cookies, and

The PHP date function formats the output for the specified range of time

/** * Date function to format output time of specified range * by bbs.it-home.org */ $stand = "2013-01-"; for ($i = 1; $i $time = Strtotime ($stand. $i); $date [] = Date ("Ymd", $time); }

How to implement PHP URL pseudo-static

Convert URLs to static URLs function Url_rewrite ($file, $params = Array (), $html = "", $rewrite = True) { if ($rewrite) {//development phase is not rewrite, where the development of the time, put $rewrite = False $url = ($file

Simple MySQL tool implemented by PHP (executes multiple SQL statements)

This article describes the PHP implementation of a simple MySQL tool that may execute multiple SQL statements, with the need for a friend reference.The code is as follows: ";//Resolve not to enter a non-colon without a SQL problem for ($i

PHP File download functions (multiple formats supported)

This article introduces a PHP implementation of a file download function, you can support the download of a variety of format files. Refer to a friend who needs it.PHP file Download function share, the code is as follows: 404 File Not found!");

PHP Export CSV file function (Enhanced version)

/** * Output CSV header information * Note: There should be no data output before and after using this function * @param data downloaded $data the Array * @param file name downloaded $file _name String * @edit:

Simple sample code for PHP math functions

A small example of a PHP math function-bbs.it-home.org Echo ABS (-1);//Take absolute value function echo "####### #ceil, floor function ######"; echo ceil (1);//Take the smallest integer greater than the parameter

The difference between time (), date (), and Mktime () in PHP

Print (Date ("L DS of F Y h:i:s A")); Print ("July 1, is on a". Date ("L", Mktime (0,0,0,7,1,2000))); ?> Copy CodeExample two: $tomorrow = Mktime (0,0,0,date ("M"), Date ("D") +1,date ("Y"))

Phpexcel exporting an Excel plus hyperlink instance code

Write Excel Include class Require_once (' classes/phpexcel.php '); Require_once (' classes/phpexcel/writer/excel2007.php '); $objPHPExcel = new Phpexcel (); /** * Phpexcel Export Excel * by bbs.it-home.org */

Total Pages: 5208 1 .... 1056 1057 1058 1059 1060 .... 5208 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.