今天小編給大家分享的是easyui是否支持PHP,相信很多人都不太了解,為了讓大家更加了解easyui,所以給大家總結(jié)了以下內(nèi)容,一起往下看吧。一定會(huì)有所收獲的哦。
創(chuàng)新互聯(lián)主營(yíng)新化網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,重慶APP軟件開發(fā),新化h5成都微信小程序搭建,新化網(wǎng)站營(yíng)銷推廣歡迎新化等地區(qū)企業(yè)咨詢
easyui是否支持PHP?
easyui支持php,具體的使用方法是使用easyui來搭建頁(yè)面結(jié)構(gòu),然后通過php返回的數(shù)據(jù)進(jìn)行展示即可。
EasyUI是一組基于jQuery的UI插件集合體,EasyUI的目標(biāo)就是幫助web開發(fā)者更輕松的打造出功能豐富并且美觀的UI界面。開發(fā)者不需要編寫復(fù)雜的javascript,也不需要對(duì)css樣式有深入的了解,需要了解的只有一些簡(jiǎn)單的html標(biāo)簽。
下面是一個(gè)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返回?cái)?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)確性是絕對(duì)沒問題的。希望以上內(nèi)容可以對(duì)大家有一定的參考價(jià)值,可以學(xué)以致用。如果喜歡本篇文章,不妨把它分享出去讓更多的人看到。
分享文章:easyui是否支持PHP?
標(biāo)題路徑:http://bm7419.com/article40/pcgieo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、網(wǎng)站建設(shè)、小程序開發(fā)、微信小程序、域名注冊(cè)、品牌網(wǎng)站設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)