LZW compression algorithm

The LZW compression algorithm implemented by PHP /** * @link http://code.google.com/p/php-lzw/ * @author Jakub Vrana, http://php.vrana.cz/ * @copyright Jakub Vrana * @license

GBK to pinyin Pinyin, attention is not on the network everywhere is GB2312 turn pinyin

ord

A search on the internet, everywhere is "php to pinyin", but the code only supports GB2312,Even "Qian", "Mo", "Hui" and other words are not supported.For Chinese names to pinyin, that code is far from enough to use. Now publish a correct GBK pinyin

The difference between empty and isset in PHP

/** * isset-detection variables are set * Returns TRUE if the variable exists, otherwise false * * empty-Check if a variable is empty * If the variable is a non-null or nonzero value, empty () returns false **/

PHP Digital Verification Code

Session_Start (); Generate a Captcha picture Header ("Content-type:image/png"); Srand (Double) microtime () *1000000); $im = Imagecreate (62,20); $black = Imagecolorallocate ($im, 69,12

Fusion of JPGE and PNG images

Jpge pictures and PNG image fusion, in fact, we are familiar with the watermark technology. The most important sentence in the following code is: To set the color blending mode of an imageImagealphablending ($ground _im, true); /

A php upload download file source code

FileList $dir = ' upload/'; } if (Is_dir ($dir)) { if ($dh = Opendir ($dir)) { while (($file = Readdir ($DH))!== false) { if ($file! = "." && $file!

PHP and JS implement convert file size to human readable way

function My_formatsize ($size) { $size = Doubleval ($size); $rank = 0; $rankchar = ' Bytes '; while ($size >1024) { $size = $size/1024; $rank + +; } if ($rank ==1) { $rankchar = "KB";

JS upload pictures before, preview pictures ... Compatible with IE 6 IE7 IE8, Firefox ...

FIREFOX3,IE6,IE7,IE8 Upload picture Preview Copy Code 

PHP Traversal Directory

traverse all directories and files under the specified directory !--? php function List_dir ($dir) { static $result = Array (); if (Is_dir ($dir)) { $file _dir = Scandir ($dir)

phpcms2008 Add browse times Plugin

phpcms2008 Add browse times PluginIncrease the number of browse times for a specified article, increasing the number of articles in a given rangeIncrease the number of views for the specified column articleIncrease the activity of the company,

Examples of PHP multidimensional array sorting

$array = Array ( ' 0 ' = = Array (' 3 ', ' one '), ' 1 ' = = Array (' 101 ', ' both '), ' 2 ' = = Array (' A ', ' three '), ' 3 ' = = Array (' A ', ' four '), ' 4 ' = = Array (' 1 ', ' five '), ' 5 ' = = Array (' 3 ', '

PHP writes a function to delete a directory

GGARCIAA at gmail dot com (04-july-2007 01:57) I needed to empty a directory, but keeping it So I slightly modified the contribution from Stefano at takys Dot it (28-dec-2005 11:57) A Short but powerfull recursive function

Find technical cattle, Venture Partners

The company is building a large-scale industry to share the theme of the trade platform, to find understanding of web platform development, familiar with PHP, MySQL, JAVA, Android, IOS, can independently complete the site architecture and

WordPress Let the theme Support menu navigation

1, the theme folder used in the Wp-content/themes/folder There are-----functions.php in the theme (the main function of the theme is in this), add the following code to this file: Register_nav_menus (Array (' Header-menu ' + __ ('

Another function for generating picture thumbnails

function Photothumb ($p _thumb_file, $p _photo_file, $p _max_size, $p _quality = 75) { $pic = @imagecreatefromjpeg ($p _photo_file); if ($pic) { $thumb = @imagecreatetruecolor ($p _max_size, $p _max_size) or Die ("Can ' t create

Bulk change the encoding of HTML files in Meta information

Sometimes HTML files are encoded in a different way than the ones specified in Meta information, and can be done with this code. This program relies on Jsoup and Commons-io packages Import Java.io.File; Import Java.io.FileWriter;

How to get the Chinese string length in PHP

$str = ' Hello world! '; echo strlen ($STR); Output 12 ?> Copy CodeHowever, in PHP's own function, strlen and Mb_strlen are calculated by calculating the number of bytes in the string, and the number of bytes in

A method of generating local unique identification code LUID using PHP

/** * Returns a unique string that is unique in the local system. * Returns a 32-character string in the form of ' 7dac352074f221f3edc74d265c65a636 ', or ' D198D8FC56FFED627F3F8313D6F06ACF ' */ function LUID () { Return

The. ini format is used in the program configuration file.

Search from the Internet, read the file, change the key value of the method. Package com.sdut.edu.tools; Import Java.io.BufferedReader; Import Java.io.BufferedWriter; Import Java.io.FileReader; Import Java.io.

PHP removes the useless formatting functions that are pasted directly from Word.

function clearhtml ($content, $allowtags = ") { Mb_regex_encoding (' UTF-8 '); Replace MS special characters first $search = Array ('/'/U ', '/'/U ', '/'/U ', '/'/U ', '/-/u '); $replace = Array (' \ ', ' \ ', ' ' ', ' ' ', '-');

Total Pages: 5208 1 .... 3622 3623 3624 3625 3626 .... 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.