


Quickly build a backend management system template based on thinkphp
Jul 29, 2016 am 09:15 AM當(dāng)我們在搭建網(wǎng)站的時候,后端開發(fā)人員在編寫后臺的管理系統(tǒng)的時候,往往會因為缺少一個合適的后臺管理系統(tǒng)的模板,而必須去重新編寫一個,這幾天由于工作上的安排,需要去研究一下thinkcmf的后臺管理系統(tǒng),于是發(fā)現(xiàn)那個模式是相當(dāng)不錯,感覺基本每個后臺管理系統(tǒng)都可以套用,我把它的主題框架劃分了4個大塊,三級菜單欄、內(nèi)容iframe、標(biāo)簽欄、頂欄,如下圖:
是不是覺得挺可以的?是不是有種所有后臺管理系統(tǒng)都可以套用的趕腳勒?由于整個后臺過于龐大,但我們又只是要其這樣的主體UI框架,其他的都不要,于是我把它重新復(fù)制粘貼了一下,把我們需要的這個UI的實現(xiàn)給提取出來了,
查看效果:http://www.live086.cn/Text/(空間2015/09/23會停用,所以可以下載面的源碼,直接放在本地服務(wù)器(wampserver)就可以運(yùn)行)
獲取源碼:http://pan.baidu.com/s/1gdEqUYJ? 密碼:c951
這個UI比較特別的地方在,我們在選擇三級菜單欄時,右側(cè)的內(nèi)容iframe會即時的更換,所選擇的菜單項也會以標(biāo)簽的形式出現(xiàn)在標(biāo)簽欄上,可以隨意切換,關(guān)閉,同時也可以點擊刷新當(dāng)前的內(nèi)容iframe,整個操作起來舒服簡單方便,其代碼主要從幾個方面來實現(xiàn)這些功能:
openapp(url, appid, appname, selectObj)
這是一個核心的函數(shù),就是打開與菜單欄或是標(biāo)簽欄相對應(yīng)的iframe,url是iframe的路徑,thinkphp用U方法生成,appid是iframe的唯一標(biāo)識,必傳,在切換標(biāo)簽欄的時候和iframe隱藏與否有很重要的作用,否則會出現(xiàn)點擊菜單欄沒有效果的,具體可以下載源碼去看,appname則是標(biāo)簽顯示名稱,selectObj是觸發(fā)對象
$current_iframe[0].contentWindow.location.reload();
而刷新功能則是使用到iframe的屬性contentWindow,相當(dāng)于獲得iframe的window對象,于是可以達(dá)到刷新的作用
至于三級菜單怎么實現(xiàn)?關(guān)閉標(biāo)簽的實現(xiàn)?其他細(xì)節(jié)功能可以查看源碼去看!
以上就介紹了基于thinkphp的后臺管理系統(tǒng)模板快速搭建,包括了方面的內(nèi)容,希望對PHP教程有興趣的朋友有所幫助。

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To run the ThinkPHP project, you need to: install Composer; use Composer to create the project; enter the project directory and execute php bin/console serve; visit http://localhost:8000 to view the welcome page.

ThinkPHP has multiple versions designed for different PHP versions. Major versions include 3.2, 5.0, 5.1, and 6.0, while minor versions are used to fix bugs and provide new features. The latest stable version is ThinkPHP 6.0.16. When choosing a version, consider the PHP version, feature requirements, and community support. It is recommended to use the latest stable version for best performance and support.

Steps to run ThinkPHP Framework locally: Download and unzip ThinkPHP Framework to a local directory. Create a virtual host (optional) pointing to the ThinkPHP root directory. Configure database connection parameters. Start the web server. Initialize the ThinkPHP application. Access the ThinkPHP application URL and run it.

Performance comparison of Laravel and ThinkPHP frameworks: ThinkPHP generally performs better than Laravel, focusing on optimization and caching. Laravel performs well, but for complex applications, ThinkPHP may be a better fit.

Understand the meaning of HTTP 301 status code: common application scenarios of web page redirection. With the rapid development of the Internet, people's requirements for web page interaction are becoming higher and higher. In the field of web design, web page redirection is a common and important technology, implemented through the HTTP 301 status code. This article will explore the meaning of HTTP 301 status code and common application scenarios in web page redirection. HTTP301 status code refers to permanent redirect (PermanentRedirect). When the server receives the client's

ThinkPHP installation steps: Prepare PHP, Composer, and MySQL environments. Create projects using Composer. Install the ThinkPHP framework and dependencies. Configure database connection. Generate application code. Launch the application and visit http://localhost:8000.

ThinkPHP is a high-performance PHP framework with advantages such as caching mechanism, code optimization, parallel processing and database optimization. Official performance tests show that it can handle more than 10,000 requests per second and is widely used in large-scale websites and enterprise systems such as JD.com and Ctrip in actual applications.

HTTP Status Code 200: Explore the Meaning and Purpose of Successful Responses HTTP status codes are numeric codes used to indicate the status of a server's response. Among them, status code 200 indicates that the request has been successfully processed by the server. This article will explore the specific meaning and use of HTTP status code 200. First, let us understand the classification of HTTP status codes. Status codes are divided into five categories, namely 1xx, 2xx, 3xx, 4xx and 5xx. Among them, 2xx indicates a successful response. And 200 is the most common status code in 2xx
