'Pgp '=> 'application/pgp ',
'Asc' => 'application/pgp ',
'Exe '=> 'application/x-msdownload ',
'Doc' => 'application/msword ',
'Rtf '=> 'application/rtf ',
'XLS '=> 'application/vnd. ms-excel ',
'Ppt '=> 'application/vnd. ms-powerpoint ',
'Mdb '=> 'application/x-msaccess ',
'Wri' => 'application/x-mswrite ',
);
5. generate an excel file in php
Header ("Content-type: application/vnd. ms-excel ");
Header ("Content-Disposition: filename=test.xls ");
Echo "test1 \ t ";
Echo "test2 \ t \ n ";
Echo "test1 \ t ";
Echo "test2 \ t \ n ";
Echo "test1 \ t ";
Echo "test2 \ t \ n ";
Echo "test1 \ t ";
Echo "test2 \ t \ n ";
Echo "test1 \ t ";
Echo "test2 \ t \ n ";
Echo "test1 \ t ";
Echo "test2 \ t \ n ";
?>
// You can change the corresponding file header to export file formats such as .doc. xls.
6. time comparison problems
For example, a forum marks a post posted on the day with a new image.
Method 1:
// $ Db-> rows [$ I] [date] indicates the datetime field value in the database.
$ Today = time ();
$ TheDay = date ("Y-m-d H: I: s", $ today-24*3600 );
$ NewTag = $ db-> rows [$ I] [date]> = $ theDay? "":"";
Method 2:
$ NewTag = $ db-> rows [$ I] [date]> = date ("Y-m-d 00:00:00 ")? "
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.