惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
L
LINUX DO - 最新话题
Recorded Future
Recorded Future
月光博客
月光博客
博客园 - 【当耐特】
博客园 - 叶小钗
宝玉的分享
宝玉的分享
量子位
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Vercel News
Vercel News
L
LangChain Blog
B
Blog
Y
Y Combinator Blog
爱范儿
爱范儿
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
博客园 - Franky
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
云风的 BLOG
云风的 BLOG
C
Cisco Blogs
Scott Helme
Scott Helme
I
Intezer
T
The Exploit Database - CXSecurity.com
MyScale Blog
MyScale Blog
T
Tor Project blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Troy Hunt's Blog
N
News and Events Feed by Topic
大猫的无限游戏
大猫的无限游戏
F
Fortinet All Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
Security Affairs
Cyberwarzone
Cyberwarzone
PCI Perspectives
PCI Perspectives
小众软件
小众软件
D
DataBreaches.Net
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Know Your Adversary
Know Your Adversary
Forbes - Security
Forbes - Security
S
Securelist
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
The Last Watchdog
The Last Watchdog

博客园 - 雪莉06

antd vue 树形表格 vue2 jeecgBoot keepalive 解决方案 vue中实现页面全屏和指定元素全屏 screenfull全屏组件的基本使用 网页导出EXCEL格式数据,长数字变为科学计数法的解决方法 织梦dede:arclist按最新修改排序orderby=pubdate无效的解决方法 vue-router报错:Uncaught (in promise) NavigationDuplicated {_name: ‘NavigationDuplicated‘, name: ‘Navig nvm的安装和使用(转) elementUI 的 input无法输入bug解决 vue数字翻牌效果 j-modal的 slot="footer" 失效 v-if判断页脚按钮 帝国CMS后台登录空白怎么办?如何修改成https ES6两个数组进行比较 element ui form表单 表格下嵌套动态表格,新增行,删除行 vue 父子组件传值报错:this.$emit is not a function 解决 dede列表页调用二三级导航栏(转载) a-table 鼠标滑过显示小手,当前行可点击(转载) echarts折线图使用dataZoom,切换数据时渲染异常,出现竖线bug vue里面修改title样式
dedecms织梦自定义表单导出到excel的方法
雪莉06 · 2025-04-12 · via 博客园 - 雪莉06

修改教程如下:

1,找到该路径下的文件/dede/templets/diy_main.htm

2,找到 前台预览</a>在其下一行增加代码<a href="diy_list.php?action=excel&diyid={dede:field.diyid/}" target="_blank">导出表单Excel</a>注意 | 这个分割符号,这个分割符号加在 前台预览</a> 的后面,可以参考上面的代码

3,找到路径下的文件/dede/diy_list.php

4,找到 array('post', 'list', 'edit', 'check', 'delete')) 将该代码修改为 array('post', 'list', 'edit', 'check', 'delete', 'excel'))

继续找到 else

{

showmsg('未定义操作', "-1");

} 在其上面加入

else if($action == 'excel')

{

header("Content-type:application/vnd.ms-excel");

header("Content-Disposition:attachment;filename={$diy->name}_".date("Y-m-d").".xls");

$fieldlist = $diy->getFieldList();

echo "<table><tr>";

foreach($fieldlist as $field=>$fielddata)

{

echo "<th>{$fielddata[0]}</th>";

}

echo "<th>状态</th>";

echo "</tr>";

$sql = "SELECT * FROM {$diy->table} ORDER BY id DESC";

$dsql->SetQuery($sql);

$dsql->Execute('t');

while($arr = $dsql->GetArray('t'))

{

echo "<tr>";

foreach($fieldlist as $key => $field)

{

echo "<td>".$arr[$key]."</td>";

}

$status = $arr['ifcheck'] == 1 ? '已审核' : '未审核';

echo "<td>".$status."</td>";

echo "</tr>";

}

echo "</table>";

}