How to install and enable PHPGD Library in Linux
# Tar xvzf zlib-1.2.3.tar.gz
# Cd zlib-1.2.3
#./Configure
# Make & make install
3. install freetype
# Tar xvzf freetype-1.3.1.tar.gz
#
Example of using phpcurl to simulate post data submission
Header ("Content-type: text/html; charset = utf8 ");
/*
* Submit a request
* @ Param $ header array set the array ("Host: devzc.com")
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 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 (; $
PHP sample code for exporting a style Excel file
/**
* Export an excel file with a style
* Edit: bbs.it-home.org
*/
Include 'writer. php ';
/***** Prepare the exported data ****/
$
Php's method to determine whether an array is a subset of another array
// Quickly determine whether the $ a array is a subset of the $ B array
$ A = array (135,138 );
$ B = array (135,138,137 );
Php replaces small functions of html content
/**
* Replacing html content
* By bbs.it-home.org
*/
Function htmlsp ($)
{
If (strpos ($ a, '
{
Echo $;
} Else
{
PHP implements the timeline function (just five minutes ago)
Function tranTime ($ time ){
$ Rtime = date ("m-d H: I", $ time );
$ Htime = date ("H: I", $ time );
$ Time = time ()-$ time;
Example code for creating a 24-hour bar chart in the phpGD Library
/*
24-hour column chart
Author: taokey
QQ: 29611705
* Edit: bbs.it-home.org
*/
Function h24 ($ str ){
$
PHP's method of disabling IP access (not filtering search engine spider)
/**
* Blocks access from specified IP addresses, but does not block search engine spider
* By bbs.it-home.org
*/
Statistics on the number of file downloads implemented by PHPMysql and jQuery
Create table if not exists 'downloads '(
'Id' int (6) unsigned not null AUTO_INCREMENT,
'Filename' varchar (50) not null,
PHP randomly displays the specified text (ifelseif usage)
/**
* Randomly display specified text
* By bbs.it-home.org
*/
Function getRand (){
$ A = rand (1, 5 );
If ($ a = 1
Php5.2.x output operation details
$ A = "hello ";
$ B = "world ";
Echo $ a, $ B ,"";
Echo $ a. $ B ."";
Print $ a. $ B;
Output result: helloworldhelloworldhelloworldHowever, a compilation
The PHP string replacement function can replace multiple keywords at the same time.
/**
* String replacement function
* Edit: bbs.it-home.org
*/
Function replace ($ string, $ keyArray, $
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