Php Chinese processing functions

  /*Php uses ISO-8859-1 to process strings, that is, to process strings in a single byte. The Chinese code is a multi-byte character. When substr is used,Strlen, str_peplace, and other functions are prone to errors. Special Chinese operations must

Use PHP or JS to obtain the image size, height, and width

  $ Arr = getimagesize ("images/album_01.gif ");Echo $ arr [3];$ Strarr = explode ("", $ arr [3]);Echo $ strarr [1];?>

PHP-based chat room (3)

Now we have the file that needs to be cross-referenced through the $ REMOTE_ADDR variable, so that we can distinguish whether the user who wants to post has been flattened or not. Simple:For ($ counter = 0; $ counter If ($ banned_array [$ counter] =

Example of the PHP processing time for dynamic web page creation Technology

/*** Convert to UNIX Timestamp*/Function gettime ($ d ){If (is_numeric ($ d ))Return $ d;Else {If (! Is_string ($ d) return 0;If (ereg (":", $ d )){$ Buf = split ("", $ d );$ Year = split ("[-/]", $ buf [0]);$ Hour = split (":", $ buf [1]);If (eregi

Php Rename and copy files

Php Rename and copy files$ Nname = $ nowpath. $ newfilename;If (file_exists ($ nname) |! File_exists ($ oldname )){M ($ nname. 'The target file already exists or the original file does not exist ');} Else {M (basename ($ oldname). 'rename '.

Php converts text files to csv files

eol

Php converts text files to csv files Php converts text files to csv filesThis class provides a quick and easy way to convert a CSV file to a fixed width. It can use SplFileObject to execute iterations so that an iteration that is very efficient only

My original php generic paging class, supports the top and bottom pages ..

Function fPageCount ($ TotalResult, $ numPerPage, $ Page ){$ NaviLength = '10'; // display quantity$ ShowMorePageGo_Type _ = 0; // jump style$ Int_showNumberLink _ = '10 ';$ NonLinkColor _ = "#999999 ";$ ToF _ = " 9 ";$ ToP10 _ = " 7 ";$ ToP1 _ = "

Php fgets Function

Php fgets Function Fgets(PHP 4 and PHP 5)Fgets-get the pointer to the line slave FileDescriptionString fgets (resource $ processing [summary $ length])Get the line from file pointer.ParametersHandleThe file pointer must be valid and must point to a

PHP mysql_field_type () function

  Definition and usageMysql tutorial _ field_type() Specifies the field type in the returned result set of the function. If the operation succeeds, the type of the specified field is returned. If the operation fails, false is returned.

Php ltrim () rtrim () trim () delete character spaces

The trim function in php cannot automatically delete all spaces like in asp. It provides the rtrim () trim () function and can be referenced as needed. The Code is as follows: Copy code $str=" 去除前后空格 ";echo "方括号中为原始字符串:[".$

In php, parse_str parses the query string to the variable.

In the fourth phase of the PHP built-in Function Research Series, The parse_str function is used to parse the query string to the variable. This article mainly discusses the functions and usage of the parse_str () function. The parse_str () function

Php strtotime () function time and date conversion

In php, The strtotime () function resolves the date and time descriptions of any English text into Unix timestamps. This function is also frequently used. If you need it, please refer to it. SyntaxStrtotime (time, now) parameter descriptionTime

Php and imagemagick are used to process the upload and zoom (posting) of image files)

Use php and imagemagick to process upload and zoom of image filesPhp is very easy to process file uploads. However, if you want to scale the uploaded image, you can use GD,Complicated processing is required. ImageMagick is an image processing

PHP4 calls self-compiled COM components

Author: East Yi snakeAfter calling JavaBean in PHP4 and trying to call COM, I thought it was very difficult. I wrote an Active Dll using VB6 and called it in PHP4 immediately, it is much more convenient than calling javabean. The following describes

Use PHP to receive POP3 mails (3)

Application InstanceThe POP3 mail receiving class has already been described in detail in the previous article. Let's take a look at how to apply this class:   Include ("pop3.inc. php ");$ Host = "pop.china.com ";$ User = "boss_ch ";$ Pass = "026007

Example of regular expression: Check email integrity in php

If (eregi ("^ [_. 0-9a-z-] + @ ([0-9a-z] [0-9a-z-] +.) + [a-z] $", $ email )){Echo "your email has passed the preliminary check ";}?>In this sentence, an eregi function is first applied, which is quite understandable. If you look for a book, you can

Exploring slow code optimization methods for accelerating PHP development programs

Grasp pear: BenchMark. Now you know how to test your code and how to determine which part of your code is slow. Next I will talk about how to eliminate or optimize the slow code.In this regard, my main experience is only two points. One is to

Php ajax page 2

Ajax pagination php ajax pagination java ajax pagination asp.net ajax pagination jquery ajax pagination jsp ajax refreshing pagination asp ajax pagination implementation pagination ajax jsp paginationNext, let's look at the page. js code in the

Php watermarks Images

/* ClassName: ImageHandler* Filename: ImageHandler. phpcls* Author: Tony Don* Date: 2008-03-27* @ Copyright txdnet.com* Function: Handler Images*/ Class ImageHandler{Var $ dst_img; // target fileVar $ h_src; // image resource handleVar $ h_dst; //

Php File Download instance code

Php tutorial File Download instance codeFunction xiazai ($ file_dir, $ file_name)// Parameter description:// File_dir: directory of the file// File_name: File Name{$ File_dir = chop ($ file_dir); // remove unnecessary spaces in the path// Obtain the

Total Pages: 12780 1 .... 11990 11991 11992 11993 11994 .... 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.