Intercept functions of php mixed Chinese and English strings
/**
* Intercept Chinese and English strings.
* By bbs.it-home.org
*/
Function mb_str_split ($ string ){
# Split at all
Phpgd library-based image creation method
$ Im = imagecreate (200,150 );
Echo $ im;
?>
// Output
Resource id #1
2. magecreatetruecolor-create a true-color canvas 1 in the format of
PHPGD library function library (favorites)
Share Common functions in the php gd library with Chinese comments and perform classification processing, including image information, new/loaded images, output images, and other php gd library
Install phpgd Library in linux
Tar xzvf zlib-1.2.3.tar.gz
Cd zlib-1.2.3
./Configure
Make
Make install
2. install freetype
Tar xzvf freetype-2.2.1.tar.gz
Cd freetype-2.2.1
./
How to import and export Excel files using PHP
This article describes how to import and export excel files in php, how to export excel files using phpexcel or Spreadsheet_Excel_Writer, and how to export csv files.1. PHP exports the Excel
Php intercepts Chinese strings (without garbled characters)
$ Str = 'who am I '; // A gbk-encoded string
Echo mb_substr ($ str, 0, 1, 'gbk'); // output me
The mb_substr method has one more
The entire process of installing phpgd Library in yum in linux
[Root @ jbxue ~] # Yum install php-gd *
Setting up Install Process
Setting up repositories
Base 100% | ===================================|
Install the GD library for php in linux
Tar zxvf zlib-1.2.3.tar.gz
Cd zlib-1.2.3
./Configure -- prefix =/usr/local/zlib
Make
Make install
2. install libpng
Tar zxvf
How to install the GD Library in php5
Cd libpng-1.2.40
Mv scripts/makefile. linux./Makefile # Make sure to use Makefile under script instead of using./configure
Generation:
Make
Make install
Php sample code used to determine whether an array is ordered
/**
* Determine whether the array is ordered
* By bbs.it-home.org
*/
Function JudegSortArray ($ array ){
If ($ array [0]> $ array
Php generates column numbers in excel
/**
* Use php code to generate the serial number in an excel or csv file
*/
Public function loop (){
$ Loop = 0;
$ Charnum = 65;
For (; $
Sample code for importing excel data using phpexcel
/**
* Import basic product information
* Edit: bbs.it-home.org
*/
Public function importProductBasicInfo ($ data ){
PHP sample code for batch database update
/**
* Update databases in batches
* By bbs.it-home.org
*/
For ($ I = 1; $ I size; $ I ++ ){
$ Query [] = "update tb_enterprise set eid =
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