Basic usage of phpexcel class library
// Write an excel file
// Include class
Require_once ('classes/PHPExcel. php ');
Require_once ('classes/PHPExcel/Writer/excel2007.php ');
$ ObjPHPExcel
How to execute linux commands in php
$ Last_line = system ("ls", $ retval );
Echo "Last line of the output:". $ last_line;
Echo"
Return value: ". $ retval;
?>
Exec function description:
Example of using google Map interface to develop applications in php
Function selected ($ param, $ value ){
If ($ param = $ value) print "SELECTED ";
}
# Collect any form data to control the display
Php + mysql paging query code and demo
// To avoid errors caused by repeated file inclusion, the following conditions are added to determine whether a function exists:
If (! Function_exists (pages )){
Php verification code php non-preset image generation verification code
This article describes how to generate a verification code for a php non-preset image. you do not need to preset the verification code picture on the server. The image
How does the Sina SAE cloud platform use codeigniter database configuration?
$ Db ['default'] ['hostname'] = SAE_MYSQL_HOST_M;
$ Db ['default'] ['username'] = SAE_MYSQL_USER;
$ Db ['default'] ['password'] =
Example of PHP reading and processing large CSV files by row
/**
* Csv_get_lines reads certain rows of data in the CSV file.
* @ Param $ csvfile csv file path
* @ Param $ lines: number of lines read
So that your PHP object can be foreach, and attributes are modified using Private
If you are bored, you can play with it.The traversal object is actually just a specific attribute of the array type in the object.You can use foreach directly
Nine lines of code is too wasteful, and five lines of code are sufficient. you do not need to recursively format the tree of infinitely classified data.
We know that the infinite classification of many open-source software uses recursive
B2Core: 300-line phpMVC architecture
B2Core is a lightweight php MVC framework. the 300-line code encapsulates common CRUD and other practical functions.For the latest code, see the http://b2core.b24.cn, and welcome criticism and
Php generates a random code segment
/*
* Note: generate a random code and display the random code graphically.
*/
$ ViewRandomCode = mt_rand (1000,10000 );
Session_start ();
$ _
Convert the string open_door to OpenDoor and convert abc_bcd_cde to AbcBcdCde.
Convert the string open_door to OpenDoor and convert abc_bcd_cde to AbcBcdCde.
[Html code]
Convert the string open_door to
PHP Lunar Calendar Conversion
PHP Lunar Calendar Conversion
/*
School of Computer Science and Engineering, Qujing Normal University, Yunnan province-Edited by Yang Haixi
9-9-3
*/
Class Lunar
{
Form toolkit with synchronization token
It is said that the Shenzhen 2011 Universiade is not coming, so I was arrested by the Youth League Committee to serve as a volunteer service station. A small form toolkit is written in the process.
Input validation using the filter function in php
If (isset ($ _ GET ["value"]) {
$ Value = $ _ GET ["value"];
}
Else {
$ Value = false;
}
If (is_numeric ($ value) & ($ value >=15 & $
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