Copy CodeThe code is as follows:
Fix 404 Pages:
Header (' http/1.1 OK ');
Set 404 Header:
Header (' http/1.1 404 Not Found ');
Set Moved permanently header (Good for redrictions)
Use with location header
Header (' http/1.1 301 Moved permanently ');
The PHPExcel class is a php excel table processing plug-in. Next I will introduce how to use the PHPExcel class to import and export excel tables, if you have any questions, please do not refer to it (PHPExcel Baidu download here is not introduced ).
Write and generate excel files:
Copy codeThe Code is as follows: include 'phpexcel. php ';
Include 'phpexcel/Writer/excel2007.php ';
// Or include 'phpexcel/Writer/excel5.php'; for output. xls
Include 'phpexcel/IOFactory. php'; // PHPExcel factory
Common PHPExcel methods .? Set includepathset_include_path (.. PATH_SEPARATOR.D: ZealPHP_LIBS.PATH_SEPARATOR.get_include_path (); ** www.2cto.com * of the PHPExcel class library as an example.
// Set the include path of the PHPExcel class
/* +---------------------------------------------------------------------- | Introduce: Data export Excel +----------------------------------------------------------------------| @param $config Header, file name and other related configuration
This article provides a detailed description of PHPExcel and the methods for integrating PHPExcel into the CI framework. For more information, see
Write and generate excel files:
The code is as follows:
Include 'phpexcel. php ';Include
Export the database content to excel in php. To export the content in the mysql database to excel, you only need to use the header to output the csv format document, you can simply export the excel file in mysql. let's take a look at the example
10 common code samples in PHP Development blacklist filtering random color generator downloads files from the Internet I. blacklist filtering
Function is_spam ($ text, $ file, $ split = ':', $ regex = false ){
$ Handle = fopen ($ file, 'RB ');
$
PHPEXCEL usage and introduction. PHPEXCEL is a php plug-in used to generate excel files. it can easily operate excel data, such as generating excel files and modifying excel data. I. PHPEXCEL introduction PHPEXCEL provides PHPEXCEL as a php plug-in
To work with an Excel table, use the Phpexcel plugin. Since I generally use the CI framework, the CI framework is introduced.
The first thing to do is to introduce Phpexcel files:
$this->load->library (' phpexcel/iofactory '); $this->load->model ('
PHP is less practical than Tips. 1. simply determine the validity of an IP address. email regular expression judgment 3. example 4: Check whether the IP address and mask are valid. about form refresh 5. about form refresh 1. simply determine IP
PHPExcel summarizes some common basic methods. Below I used a complete PHPExcel instance to summarize some tips for using PHPExcel. For more information, see. The code is as follows: Copy the code? I used a complete PHPExcel instance under inc for
Report generation and reading are often used in the website management background. CSV and Excel are common report formats. This article describes how to generate and Read excel files in php, you can find out what you need. Tables are usually
This article introduces how to resolve Warning: cannot modify header information-headers already sent by in php when headers cannot be redirected ......
The following message is often displayed: cannot modify header information-headers already sent
Phpexcel is a fairly powerful MS Office Excel document Generation Library, and Phpexcel is a good choice when it comes to outputting more complex format data. However, the use of the method is relatively cumbersome. List it in mind.
Here is a summary of several ways to use
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
To export the content in the mysql database to excel, you only need to use the header to output the csv format document, you can simply export the excel file in mysql. let's take a look at the example below. the core code is here. the code is as
Summary of csv files and problems generated by PHP downloads ,. Download the csv file generated in the browser PHP and the problem summary,
A project producer displays the information of an order and can store the information in a. csv file and
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.