A case of PHP multi-process implementation code

while (1)//loop takes 3 processes //{ Declare (Ticks=1); $bWaitFlag = FALSE; Whether to wait for the process to end $bWaitFlag = TRUE; Whether to wait for the process to end $intNum = 3; Total number of processes $pids =

Examples of the use of PHP get_class () functions

Class Foo { function Name_none_static () { echo "My name is". Get_class (). ""; echo "My name is". Get_class ($this). ""; } } Class internal Call $bar = new Foo ();

Example of application of reflection in PHP

/** * PHP Reflection Instance * Edit bbs.it-home.org */ Class person{ Public $name; function __construct ($name) { $this->name= $name; } } Interface module{ function execute (); }

A case of PHP time format check function

This article describes a PHP implementation of the time format check of a function to check whether a given time is well-formed. Please refer to the friends who are in need.The following code can be used to verify whether the time that the user

PHP implementation of a two-way linked list of a sample code

/** * * * Double linked list * @author zhiyuan12@ * @modified 2012-10-25 * @site: bbs.it-home.org */ /** * Linked list element node class */ Class Node_element { Public $pre = NULL; Precursor

PHP replaces the inner chain of the function PHP keyword replacement (with mask to restore the original link function)

/* * PHP replacement article inside the chain * by bbs.it-home.org */ function _base64_encode ($t, $str) { Return $t. " \ "". Base64_encode ($STR). " \""; } function _base64_decode ($t, $str) { Return $t. " \ "

Example of PHP uploading files and creating a recursive directory

/** * Upload files to create a recursive directory * edit:bbs.it-home.org */ $uid =$_request[' uid ']; $avatar = ' d:/www/discuz/uc_server/data/avatar/'. Get_avatar ($uid, $size, $type); $dir =dirname ($avatar);

PHP Security Filter Code (360 provides high safety factor)

/** * Filter Hazard parameters * edit:bbs.it-home.org */ Code by Safe3 function Customerror ($errno, $errstr, $errfile, $errline) { echo "Error number: [$errno],error on line $errline in $errfile"; Die ();

crontab Introduction to how PHP Works automatically

This article introduces, in PHP, with the help of Crontab, the method of automatic operation of related programs, the need for friends, refer to it.The crontab-operates the daemon for each user and the schedule for that execution. Some of the

PHP takes the method of specifying the length of data in the array to share

This article introduces, in the PHP programming, takes the array to specify the length data the method, has the need friend reference.In the PHP program, reduce the number of queries, but also a way to improve the overall performance of the site.All

PHP string function Strtr, str_replace and preg_replace efficiency comparison

This article introduces the three functions Strtr, Str_replace and Preg_replace, which are used in PHP for string processing, in the comparative analysis of efficiency. If you need a friend, refer to it.Below compare the efficiency of STRTR,

Two ways to set the time zone in PHP

date.timezone = PRC copy code Set the time zone in code date_default_timezone_set (' Asia/shanghai ');//' Asia/shanghai ' Asia/On Sea date_default_timezone_set (' asia/chongqing ');//Where asia/chongqing ' is '

PHP gets the Google PR value of the site

/** * PHP code to get the PR value of the website * by bbs.it-home.org */ $googlehost = "toolbarqueries.google.com"; $googleua = "mozilla/5.0 (Windows; U Windows NT 5.1; En-us; rv:1.8.0.6) gecko/20060728 firefox/1.5 ";

PHP filter post, get sensitive data examples

/** * Batch filter Post,get sensitive data * by bbs.it-home.org */ if (GET_MAGIC_QUOTES_GPC ()) { $_get = Stripslashes_array ($_get); $_post = Stripslashes_array ($_post); } Function

How to install Php-mcrypt extensions on CentOS 6

[Root@jbxue ~]# wget http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-7.noarch.rpm [Root@jbxue ~]# RPM-IVH epel-release-6-7.noarch.rpm Copy Code2, install Php-mcrypt [Root@jbxue ~]# Yum Install Php-mcrypt

PHP http_user_agent function for judging phone types

This article introduces the following, in PHP, using http_user_agent to judge the function of the phone type, there is a need for friends, reference.The method of judging the phone type is mentioned in the previous article of the programmer's house.

Example code for PHP user login and validation

This article introduces the implementation of PHP with the user login and verification of a piece of code, there is a need for friends, can refer to learning under.1, login page login.html submit Form form Register User Login Page

PHP generates code sharing with logo QR code image

This article introduces, PHP generation with logo QR code image of an example code, learning two-dimensional code of friends, can make a reference.In PHP, the generation of two-dimensional code images can be implemented with the help of the QRCode

PHP MySQL database backup class and calling method

Share a MySQL database backup class, and attach a detailed call method, with a friend in need of reference.A PHP MySQL database backup class, shared to everyone.1,mysql database backup class backdata.class.php: Mysql_link = $mysql _link;

Code sharing to prevent SQL injection and cross-site attacks (primary utility type)

Anti-injection function function Inject_check ($sql _str) { $check = eregi (' select|insert|update|delete|\*|\/\*|\ ' |\.\.\/|\.\/| Union|into|load_file|outfile ', $sql _str); if ($check) { Page_href ("http://". $_server['

Total Pages: 5208 1 .... 1662 1663 1664 1665 1666 .... 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.