PHP traversal file and folder names under a folder _php tutorial

Opendir () function The Opendir () function opens a directory handle that can be used by Closedir (), Readdir (), and Rewinddir (). If successful, the function returns a directory stream, otherwise it returns false and an error. You can hide the

PHP Settings phpMyAdmin Set login password _php tutorial

phpMyAdmin directly with MySQL, so security is very critical, some friends for the sake of convenience, there is no password for phpMyAdmin to set a login, this is very dangerous, if the address is known to others, then your MySQL is finished. So

PHP using Baidu Weather Interface Example _php Tutorial

Note the area to Transcode Baidu AK Application Address: Http://lbsyun.baidu.com/apiconsole/key Copy the Code code as follows: $city = "Jiaxing";$content = file_get_contents ("http://api.map.baidu.com/telematics/v3/weather?location=%e5%98%89%e5%

How to force a PHP command line script to run a single process _php tutorial

Copy CodeThe code is as follows: /** * Guaranteed Single Process * * @param string $processName process name * @param string $pidFile process file path * @return Boolean to continue executing the current process */ function singleprocess

Explore PHP session_php Tutorial again

Reprint please specify from Souldak, Weibo: @evagle Before the session and cookies are still vague, today with the YII framework encountered SESSION_REGENERATE_ID (): Session object destruction failed this error, So I looked at the working

A brief introduction to the. htaccess File _php Tutorial

The. htaccess file (or "Distributed profile" provides a way to change the configuration of a directory by placing a file containing one or more directives in a particular document directory to act on this directory and all its subdirectories. As a

PHP character _php Tutorial

Match Lookup Strstr Strpos is commonly used in forms validation, which can be used Substr Positive expression matches preg_mathc (), Preg) Mathc_all (), Preg_grep () Conversion of the encoding format Heade ("Content-type; text-html;

How to use the _php database class with the Imperial CMS tutorial

The Imperial CMS encapsulates a SQL, the file location is e/class/db_sql.php, the use of the program itself class library can bring our development convenience and efficiency, but also reduce the number of additional files. First, do the

PHP Judging whether the page is a WeChat open example _php tutorial

The code is as follows: $user _agent = $_server[' http_user_agent '); if (Strpos ($user _agent, ' micromessenger ') = = = = False) { Non-browser prohibited browsing echo "http/1.1 401 Unauthorized"; } else { Browser, allowing access echo

How to know if the server supports gzip compression _php tutorial

The gzip feature is a compression of the page size to speed up the opening of the Web page, the current mainstream browser almost all support this feature. This is a very useful and popular feature, but it requires server support to turn on gzip,

PHP template engine smarty cache using _php Tutorial

First, open and use the Smarty cache To turn on the Smarty cache, simply set the caching to true in the Smarty settings parameter and specify Cache_dir. Setting the Cache_lefetime parameter at the same time specifies the cache lifetime (in seconds)

40 PHP Code optimization Recommendations _php Tutorial

1. If a method can be static, declare it static. Speed improvement are by a factor of 4. If a method is static, it is statically declared. The rate can be increased to 4 times times. 2. Echo is faster than print. echo is faster than print. 3. Use

PHP two-dimensional array fast sorting algorithm _php tutorial

Two-dimensional array sorting algorithm and one-dimensional array sorting algorithm the basic theory is the same, all by comparing the small value in the left-variable array, the large value in the right array in the separate recursion. 1, '

PHP XML dom_php Tutorial

There are two basic types of XML parsers: Tree-based parser: This parser transforms an XML document into a tree structure. It parses the entire document and provides an API to access the elements of the tree, such as the text Document Object Model (

PHP gets the MAC address of the NIC support Win/linux system _php Tutorial

Copy CodeThe code is as follows: /** Obtain the MAC address source of the network card; currently supports Win/linux system Get the physical (MAC) address of the machine card **/ Class getmacaddr{ var $return _array = Array (); Returns an array

Example of continuous element maximum value in PHP array _php tutorial

PHP implements the maximum number of positive and negative arrays, which is required for the array, which consists of positive and negative numbers, to find out the maximum number of sub-arrays of contiguous elements in the array. It's actually a

PHP pagination sample Sharing _php Tutorial

Copy CodeThe code is as follows: Paging function First page: URL/1 second page: URL/2 function pages ($url, $totalnum, $page, $pagesize = 20) { $urladd = "; $url. = '/'; $totalpage = Ceil ($totalnum/$pagesize); if ($totalpage $page = min

Fgetcsv function cannot read the CSV file Chinese string Solution _php Tutorial

Read Data function: GetData ( = ( = ( Span $file (span>, "R"))!== ( = ())!== = ( =>[] = mb_convert_encoding (, "UTF-8", "GBK");

PHP implementation of the beautiful pagination method _php Tutorial

Pagination page numbering display algorithm Copy CodeThe code is as follows:/*** Get HTML content for pagination* @param integer $page current page* Total number of pages $pages @param integer* @param string $url The last page of the URL address

PHP database operation based on MYSQLI database Operation class Library _php tutorial

This library is simple, easy to use, easy for you to modify and improve the function, can solve most of the PHP project executed SQL operations. Preliminary work First of all, please download this class library m.class.php and then download a

Total Pages: 5208 1 .... 3202 3203 3204 3205 3206 .... 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.