PHP iterates through and prints all the file instances in the specified directory _php tutorial

Copy CodeThe code is as follows: Function: Traverse and print all files in the specified directory function Scan_dir ($dir _name, $dir _flag=1) {Static $FILE _count=1; Number of log files initial value is 1 directory name does not remember$FILE

PHP encryption and decryption sample with key share _php tutorial

ord

Copy CodeThe code is as follows: $id = "Http://www.jb51.net"; $token = Encrypt ($id, ' E ', ' jb51 '); echo ' encryption: '. Encrypt ($id, ' E ', ' jb51 '); Echo ' '; Echo ' decryption: '. Encrypt ($token, ' D ', ' jb51 '); /***********************

Using PHP to test hard disk write speed sample _php tutorial

Copy CodeThe code is as follows: Set_time_limit (0); $str = Str_pad ($STR, 512, "0"); $file = fopen ("./temp", "A +"); $i = 0; $bytes = 1000000000; $mygabyte = $bytes/1000000; echo "Test start. Waiting ... "; $starttime = time (); while ($i $i + =

Regular _php tutorials for special symbols such as PHP filter ★

Copy the Code code as follows: if (Preg_match ("/[".,:; *?~ '!@#$%^&+=) (<>{}]|\]|\[|\/|\\\|\ "|\|/", $user)) { Echo ' Do not make all the special symbols in the name, please use only letters, numbers and Chinese characters, and of course your

PHP Custom Function Dump view array information similar to the var_dump_php tutorial

This has been a long time, more than PHP comes with the var_dump more useful. Copy CodeThe code is as follows: function dump ($vars, $label = ", $return = False) { if (Ini_get (' html_errors ')) { $content = " $content. = "{$label}:$content. = "\ n\

PHP simplexml_load_file function using _php tutorial

Example XML file: The code is as follows George John Reminder Don ' t forget the meeting!

PHP implementation of Web page label completion method _php Tutorial

Introduction: PHP in the generation of static files, sometimes because of some mixed problems to make HTML tags incomplete or confusing, resulting in page confusion. The author shares the following small code can be very convenient to solve the

PHP Tutorial Magic Method Use Example (PHP magic function) _php Tutorial

Copy CodeThe code is as follows: /** PHP treats all class methods starting with __ (two underscores) as a magic method. So when you define your own class method, do not prefix __. * */ __tostring, __set, __get__isset (), __unset ()/*The __tostring

PHP Add xdebug extension Method _php Tutorial

First, download the corresponding DLL Ii. put the files in the Ext folder in the PHP installation directory Third, modify the php.ini Copy CodeThe code is as follows: [Xdebug] Zend_extension= "./ext/php_xdebug-2.2.3-5.3-vc9-nts.dll" ; The

PHP Full-width character conversion to half-width function instance Code _php tutorial

I've tried to find a lot of puzzling problems by replacing them with ASCII and other characters. In the end, replace the following characters, and make a list of all the full corners you can find now. Www.jbxue. SBC2DBC (=' 0 ' = ' 0 ', ' 1 ' = ' 1

WordPress plugin micro-letter automatic reply robot _php tutorial

At present more and more fire, WordPress also has many users Let's write a plug-in and connect the two together! Now that the test is complete, share the relevant information below. View demo Please add me to the public Innovation Lab, or scan

PHP implementation of the previous article, the next code _php tutorial

Code: //----display Previous, next post code START---- $sql _former = "SELECT * from article where id; //previous post SQL statement. Note is in reverse, because the result set is returned with only the first article, not the last

Binary cross-permission mini PHP _php Tutorial

This article mainly introduces the binary cross-permission micro PHP class, the need for friends can refer to the next Liang points: 1, many-to-many cross-scene allocation, 2, PHP new features-closure use, Batch function Array_walk/array_flip use, 3,

PHP Cache Technology Implementation _php Tutorial

PHP cache implementation, the implementation of APC and file cache, inherited cache_abstract can be implemented to call third-party caching tools. Refer to the Shindig cache class and APC. PHP code Class Cacheexception extends Exception {}

A few examples of PHP arrays converted into trees _php tutorial

PHP code The code is as follows * $SOURCEARR the original array* $key PRIMARY key* $parentKey the parent primary key associated with the primary key* The key name of the child $childrenKey generated**/ function

PHP test Hard disk Write rate _php tutorial

Use PHP to write a 1GB size file, check the hard disk write rate, there may be some error, It is recommended that you use a professional hard drive test tool to detect General computer Read and write in 20m/s, this test to perform about 40-50s

PHP Draw Applet _php Tutorial

This lottery small program, in the actual test environment can also be used, for example, the test data query in the in condition, to query the random 5 ID, and then use AB to test [Code] [PHP] CodeView Source Print? 01 02/**03 * “抽奖”函数04 *05 *

PHP, Python-related regular function point instance _php Tutorial

When we are doing string processing, if the string handler does not implement what we want, we use the regular to help us implement it. The general use of the regular situation is: matching, find, split, find and replace, we will use these cases in

Limit download speed with PHP _php tutorial

You do operation and maintenance of children's shoes, will often encounter a problem, that is, someone to download things in the office, affecting everyone online, office. The same problem, if it appears on the server, it is estimated that the boss

_php tutorials for face recognition with JQuery, PHP, and APIs

Reading: Face recognition is a computer technology that uses image algorithm to judge the position and size of face. It identifies facial features and ignores other image noises, such as buildings, trees, and bodies. Now most social networking

Total Pages: 5208 1 .... 3724 3725 3726 3727 3728 .... 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.