PHP outputs the excel file instance code. PHP output excel file instance code? Phpheader (Content-type: applicationvnd. ms-excel); header (Content-Disposition: attachment=filenameusers.xls); echo Company name. echo uses PHP to output the excel file instance code
- Header ("Content-type: application/vnd. ms-excel ");
- Header ("Content-Disposition: attachment?filename=users.xls ");
- Echo "company name "."";
- Echo "user name "."";
- Echo "password "."";
- Echo "second-level domain name "."";
- Echo "";
- Foreach ($ result [result] as $ val ){
- Echo "$ val-> ComName "."";
- Echo "$ val-> UserName "."";
- Echo "$ val-> UserTruePw "."";
- Echo emptyempty ($ val-> DoMainName )? :( Http: //. $ val-> DoMainName..jiaomai.com )."";
- Echo "";
- }
- ?>
Why? Php header ("Content-type: application/vnd. ms-excel "); header (" Content-Disposition: attachment?filename=users.xls "); echo" company name ". ""; echo...