Php 如何在Codigniter中提供管理面板列表视图链接(Docx文件下载)
实际上,我正在研究Codigniter adminpanel模块,我实现了一个模块,我想在单独的专栏中提供下载链接,如何提供请帮助Php 如何在Codigniter中提供管理面板列表视图链接(Docx文件下载),php,jquery,html,codeigniter,Php,Jquery,Html,Codeigniter,实际上,我正在研究Codigniter adminpanel模块,我实现了一个模块,我想在单独的专栏中提供下载链接,如何提供请帮助 1) i Want (**Files List**) column need to give download link. 下面是我的代码:views.php <table class="table table-hover" id="dataTables-tenant"> <thead&g
1) i Want (**Files List**) column need to give download link.
下面是我的代码:views.php
<table class="table table-hover" id="dataTables-tenant">
<thead>
<tr>
<th><input type="checkbox" data-note="tooltip" data-placement="top" data-original-title="Check/Uncheck all" class="check-all"></th>
<th>File Name</th>
<th>File title</th>
<th>Files List</th>
<th>created at</th>
<th>updated at</th>
<!-- <a href="http://localhost/fre/admin/uploads/" download="w3logo">
<img border="0" src="http://localhost/fre/admin/uploads/.'$Knowledge_id'" alt="W3Schools" width="104" height="142">
</a> -->
<th class="text-center">Actions</th>
</tr>
</thead>
</table>
文件名
文件名
文件列表
创建于
更新于
行动
脚本:
<script type="text/javascript">
var oTable = $('#dataTables-tenant').dataTable( {
"bProcessing": true,
"sAjaxSource": "<?php echo base_url(); ?>loadTenant",
"pageLength": 10,
"aoColumnDefs" : [
{
orderable: false,
"mData": null,
"aaSorting":false,
"aTargets": [0],
"mRender": function (data, type, full) {
return '<input type="checkbox" value="'+full[0]+'" name="Knowledge_id" class="case selectionne uncheck"/>';
},
"sClass": 'selectall'
},
{
orderable: false,
"mData": null,
"aaSorting":false,
"aTargets": [6],
"mRender": function (data, type, full) {
return '<center><a href="<?php echo base_url(); ?>tenant/editNew/'+full[0]+'" data-note="tooltip" data-original-title="Edit Tenant Details" class="glyphicon glyphicon-edit" id="infrastructure_btn_edit"></a> <a href="#" data-note="tooltip" data-original-title="Delete Room" data-Knowledge_id="'+full[0]+'" class="glyphicon glyphicon-trash deleteTenant"></a></center>';
},
},
]
});
</script>
var oTable=$(“#数据表租户”)。数据表({
“bProcessing”:正确,
“sAjaxSource”:“loadTenant”,
“页面长度”:10,
“aoColumnDefs”:[
{
可订购:错误,
“mData”:空,
“aaSorting”:错误,
“目标”:[0],
“mRender”:功能(数据、类型、完整){
返回“”;
},
“sClass”:“selectall”
},
{
可订购:错误,
“mData”:空,
“aaSorting”:错误,
“目标”:[6],
“mRender”:功能(数据、类型、完整){
返回“”;
},
},
]
});
在项目中创建下载文件并将数据发送到此文件
例如:
下载.php