今天小編給大家分享的是easyui是否支持PHP,相信很多人都不太了解,為了讓大家更加了解easyui,所以給大家總結(jié)了以下內(nèi)容,一起往下看吧。一定會有所收獲的哦。

easyui是否支持PHP?
easyui支持php,具體的使用方法是使用easyui來搭建頁面結(jié)構(gòu),然后通過php返回的數(shù)據(jù)進(jìn)行展示即可。
EasyUI是一組基于jQuery的UI插件集合體,EasyUI的目標(biāo)就是幫助web開發(fā)者更輕松的打造出功能豐富并且美觀的UI界面。開發(fā)者不需要編寫復(fù)雜的javascript,也不需要對css樣式有深入的了解,需要了解的只有一些簡單的html標(biāo)簽。

下面是一個easyUI+PHP展示數(shù)據(jù)的例子,供各位參考:
1、首先編寫HTML文件
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/color.css">
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/demo/demo.css">
<script type="text/javascript" src="/mine/easyui/jquery.min.js"></script>
<script type="text/javascript" src="/mine/easyui/jquery.easyui.min.js"></script>
</head>
<body>
<table id="dg" title="My Users" style="width:550px;height:250px"
toolbar="#toolbar" idField="id"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="id" width="50" editor="{type:'validatebox',options:{required:true}}">ID</th>
<th field="user_id" width="50" editor="{type:'validatebox',options:{required:true}}">UID</th>
<th field="time" width="50" editor="text">TIME</th>
<th field="type" width="50" editor="{type:'validatebox',options:{required:'true'}}">TYPE</th>
</tr>
</thead>
</table>
<script>
$('#dg').datagrid({
url: '/index/index/test2',
});
</script>
</body>
</html>2、然后編寫PHP文件
<?php
$result = Db::table('o_attend')
->select();
$arr['total']=sizeof($result);
$arr['rows']=$result;
echo json_encode($arr);
?>3、php返回數(shù)據(jù)示例:
{
"total": 2,
"rows": [{
"id": 1,
"user_id": "1",
"time": "1",
"type": 1
}, {
"id": 2,
"user_id": "1",
"time": "1",
"type": 2
}]
}關(guān)于easyui是否支持PHP就分享到這里了,當(dāng)然并不止以上和大家分析的辦法,不過小編可以保證其準(zhǔn)確性是絕對沒問題的。希望以上內(nèi)容可以對大家有一定的參考價值,可以學(xué)以致用。如果喜歡本篇文章,不妨把它分享出去讓更多的人看到。
分享文章:easyui是否支持PHP?-創(chuàng)新互聯(lián)
文章路徑:http://chinadenli.net/article22/dghcjc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、標(biāo)簽優(yōu)化、搜索引擎優(yōu)化、網(wǎng)站營銷、外貿(mào)網(wǎng)站建設(shè)、小程序開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容