!--? php
//Note include the correct classpath
requ Ire_once (DirName (__file__). '/export.php ');
$exceler = Newjason_excel_export ();
//Generate Excel format here different formats are generated
It is suggested that the reader scope has development experience. Scientific research staff (by its numrical). Strong hands-on ability. Just curious, for Linux is just a scratch, it is not recommended to continue to look down. Correct learning
# tar ZXVF httpd-2.2.6.tar.gz
# CD httpd-2.2.6
#./configure--prefix=/usr/local/apache2--enable-so--enable-track-vars--enable-proxy--enable-vhost-alias--
Include ' phpexcel.php ';
Include ' phpexcel/writer/excel2007.php ';
Or include ' phpexcel/writer/excel5.php '; For the output. xls
Create an Excel
$objPHPExcel = new Phpexcel ();
Save excel-2007 Format
PHP implementation MySQL data import
Define ("Dbhost", "localhost"); Database Host
Define ("DbUser", "root"); Database user
Define ("Dbpass", "password"); Database Password
Mysql_connect (Dbhost,dbuser,dbpass) or Die
This article introduces the PHP two functions isset, array_key_exists in the usage of the difference, there is a need for friends, can refer to see. PHP determines whether an array of index values exist, generally using isset and array_key_exists
Header ("Content-type:application/vnd.ms-excel");
Header ("Content-disposition:filename=downloaded.pdf");
echo "1\t 2\t 3\n"; where \ t is blank, \ n is the carriage return (encoding specification cannot be output directly)
echo
PHP gets today's start timestamp and end timestamp
$beginToday =mktime (0,0,0,date (' m '), date (' d '), date (' Y '));
$endToday =mktime (0,0,0,date (' m '), date (' d ') +1,date (' Y '))-1;
PHP gets yesterday start timestamp
/*----------------
* $FileName is the file name, must pass
* $FilePath is the file path. Optional, can be a relative path or an absolute path
* The @ path can only be composed of English and data, not with Chinese
* Edit
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