PHP obtains the "all sublevels and grandchildren" ID of the topic-PHP source code

In the unlimited topic category, we sometimes need to call subtopics of a certain topic, grandchildren, and so on ...... This code can implement this function PHP obtains the ID number of all sublevel and sunlevel columns in the topic. In the

PHP: compressing html functions-PHP source code

PHP functions for compressing html // Function name: compress_html // parameter: $ string // return value: compressed $ stringfunction compress_html ($ string) {$ string = str_replace ("\ r \ n ", '', $ string); // clear the linefeed $ string = str_

Php code for batch bom removal-PHP source code

Php batch remove bom code php code ";} Else {$ dirname = $ basedir. "/". $ file; checkdir ($ dirname) ;}} closedir ($ dh) ;}} function checkBOM ($ filename) {global $ auto; $ contents = file_get_contents ($ filename ); $ charset [1] = substr ($

PHP Chinese character conversion pinyin-PHP source code

PHP Chinese character conversion pinyin = '5. 0 ')? Array_combine ($ _ TDataKey, $ _ TDataValue): $ this-> Arr_Combine ($ _ TDataKey, $ _ TDataValue); arsort ($ _ Data); reset ($ _ Data ); if ($ _ Code! = 'Gb2312') $ _ String = $ this-> U2_Utf8_Gb ($

Php thumbnails-PHP source code

Thumbnails php code = Self: $ image_h) & (self: $ image_w> $ width) {// scaled back width $ small_w = $ width; // scaled back height $ n = $ width * (self: $ image_h/self: $ image_w); $ small_h = round ($ n );}} // use the source image as the

Lzw algorithm implementation php-lzw optimized version-PHP source code

Lzw algorithm implementation php-lzw optimized version --> $velocityCount--> --> [PHP] code $bits_max) { $bits_max = 1 7) { $rest_length -= 8; $return .= chr($rest >> $rest_length);

Navigation to pages-PHP source code

Paging-tail page navigation paging-tail page navigation CurrentPage = $ currentPage; $ this-> totalPage = $ totalPage; if ($ this-> totalPage currentPage = 1) {// The current page is the first page $ str = 'preview '. $ this-> currentTag (); for

Php output string in full arrangement-PHP source code

Php code output string in full arrangement Function output ($ temp, $ level) {for ($ I = 0; $ I ';} // You must note the function quanpai ($ arr, $ flag, $ level, $ num, $ temp) {if ($ level >=$ num) {output ($ temp, $ num); return ;}for ($ I = 0;

PHP custom UBB-PHP source code

PHP user-defined UBB code Function ubb ($ Text) {$ Text = trim ($ Text); // $ Text = htmlspecialchars ($ Text ); // http://blog.ddian.cn $ Text = preg_replace ("// \ t/is", "", $ Text); $ Text = preg_replace ("/\ [h1 \] (. + ?) \ [\/H1 \]/is "," \ 1

Php subnet mask calculator-PHP source code

Php subnet mask calculator php code PHP Subnet Calculator \n\n" ;$end=' ';if (empty($_POST['my_net_info'])){tr('Use IP & CIDR Netmask: ', '10.0.0.1/22

Sort out common data processing methods before and after web development (set various statements)-PHP source code

Organize common data processing methods before and after web development (collect various statements) 1. [code] [PHP] code ------------------------- Front-end/*** front-end public function method arrangement * @ author Weige * remarks: works with

Php decoration mode-PHP source code

Php decoration mode jump /*** Abstract Component role */interface Component {/*** sample method */public function operation ();} /*** decoration role */abstract class Decorator implements Component {protected $ _ component; public function _

Use google two-step verification to encrypt the dynamic password of the php page-PHP source code

Use google two-step verification to encrypt the dynamic password of the php page 0, "B" => 1, "C" => 2, "D" => 3, "E" => 4, "F" => 5, "G" => 6, "H" => 7, "I" => 8, "J" => 9, "K" => 10, "L" => 11, "M" => 12, "N" => 13, "O" => 14, "P" => 15, "Q" => 1

Share 3 functions for getting calendars in php-PHP source code

This article summarizes three php functions for getting calendars, php is used to obtain the calendar of the month of the specified date, the start date and end date of the month of the specified date, and the date range of the current week, if you

What is the maximum memory usage of php?-PHP source code

How much is the maximum memory usage of php. '; $ String = 'ABCDE'; // run the string, which can be modified here. $ memory = ($ memory + 0) * 1024*1024; $ runtime = memory_get_usage (); $ runcount = $ memory/(strlen ($ string) + 1 ); // why + 1?

A piece of boring code-PHP source code

A piece of code that is boring A piece of code that is boring /** Complete parameters and format array parameters * return FALSE, array public function format_array_value ($ a_params = null, $ a_rule = null) {if (is_array ($ a_params) &&! Empty ($

Php greedy algorithm-0-1 backpack-PHP source code

Php greedy algorithm 0-1 backpack problem --> $velocityCount--> --> 1. [Code]Hope experts can use other algorithms to implement the 0-1 backpack // Class tanxin {public $ weight; public $ price; public function _ construct ($ weight = 0, $ price =

A addition/subtraction verification code written by myself within 10-PHP source code

A addition/subtraction verification code of less than 10 written by yourself, a addition/subtraction verification code of less than 10 written by yourself Jiashu = rand (1, 10); $ this-> JianShu = rand (1, 10); $ this-> YunSuan = $ this-> Jiashu>

How does phpSWFUpload create a thumbnail and save it to a specified folder?-PHP source code

How does phpSWFUpload create a thumbnail and save it to the specified folder? 1. upload. php $ Img_ratio) {$ new_height = $ target_height; $ new_width = $ img_ratio * $ target_height;} else {$ new_height = $ target_width/$ img_ratio; $ new_width =

PHP Feixin receiving SMS-PHP source code

PHP Feixin receiving SMS code '', CURLOPT_POST => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_REFERER =>' http://f.10086.cn/im5/ Login/login. action ',); function _ construct ($ tel, $ pwd) {$ this-> tel = $ tel; $ this-> pwd = $ pwd;}

Total Pages: 12780 1 .... 8036 8037 8038 8039 8040 .... 12780 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.