The tutorial column of thinkphp below will introduce to you how Thinkphp5 integrates grid reports. I hope it will be helpful to friends in need!
## After checking many articles, there are very few articles on re-integration in thinkphp. Based on consulting online information and examples provided by grid, the process of integrating grid in thinkphp5 was completed.
Environment: phpstudy, thinkphp5, grid Report6
<script type="text/javascript" src="__STATIC__/admin/js/GRInstall.js" ></script> <script type="text/javascript" src="__STATIC__/admin/js/GRUtility.js" ></script> <script type="text/javascript" src="__STATIC__/admin/js/CreateControl.js" ></script>These three are the js used by the grid web plug-in , I put these three files in the public/admin/js directory, so... (Actually, just introduce the path wherever you put them) ######2. Make reports in the grid## ####Just follow the operating procedures######3. Insert the designer plug-in into the web page###
<script type="text/javascript"> //用查询显示控件展现报表,从URL“../grf/1a.grf”获取报表模板定义,从URL“../data/DataCenter.php?data=Customer”获取XML形式的报表数据, CreateDisplayViewerEx("100%", "100%", "__STATIC__/grf/1a.grf", "__STATIC__/data/DataCenter.php?data=Student", true, ""); </script>###3. Write the controller code###
public function DisplayViewReport() { return $this->fetch(); }###4. Modify the database connection code ######In the mysql_GenXmlData.php file in the Data directory, fill in the mysql_connect() according to your own database server conditions, and write your own database name in mysql_select_db(). ######### This is the simplest integration case, and multi-table queries are not involved. Start simple, and complex ones will become simple! #########
The above is the detailed content of Detailed explanation of Thinkphp5 integrated grid++ report. For more information, please follow other related articles on the PHP Chinese website!

The article discusses ThinkPHP's built-in testing framework, highlighting its key features like unit and integration testing, and how it enhances application reliability through early bug detection and improved code quality.

Article discusses using ThinkPHP for real-time stock market data feeds, focusing on setup, data accuracy, optimization, and security measures.

The article discusses key considerations for using ThinkPHP in serverless architectures, focusing on performance optimization, stateless design, and security. It highlights benefits like cost efficiency and scalability, but also addresses challenges

The article discusses implementing service discovery and load balancing in ThinkPHP microservices, focusing on setup, best practices, integration methods, and recommended tools.[159 characters]

ThinkPHP's IoC container offers advanced features like lazy loading, contextual binding, and method injection for efficient dependency management in PHP apps.Character count: 159

The article discusses using ThinkPHP to build real-time collaboration tools, focusing on setup, WebSocket integration, and security best practices.

ThinkPHP benefits SaaS apps with its lightweight design, MVC architecture, and extensibility. It enhances scalability, speeds development, and improves security through various features.

The article outlines building a distributed task queue system using ThinkPHP and RabbitMQ, focusing on installation, configuration, task management, and scalability. Key issues include ensuring high availability, avoiding common pitfalls like imprope


Hot AI Tools

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

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

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Chinese version
Chinese version, very easy to use