The empire cms universal interface plug-in outputs the empire cms content to external applications through the public URL and parameter interface. The usage is as follows: install the plug-in and enable it. Configuration interface: Set name permissions Set extended column usage interface: URL format: http://yourwebsite.com/e/api/interface name.php? Parameter 1=value 1¶meter 2=value 2... Parameter: classid (column ID), fields (fields to be obtained), num (number), order (sort), page (current page), pagesize (number of pages per page) Return results: JSON format, including total, page, pagesize, dat
Instructions for using the empire cms universal interface
1. What is the empire cms universal interface?
Empire cms universal interface is a plug-in that can output imperial cms content to external applications or platforms. It exposes a URL and parameter interface to facilitate third-party systems to obtain imperial cms content.
2. How to use the empire cms universal interface?
1. Install the plug-in
Download the universal interface plug-in from the imperial cms official website and upload it to the website root directory plugins directory, and then install it in the background plug-in management and enabled.
2. Configure the interface
In the imperial cms background, enter the plug-in management-> universal interface and perform the following configuration:
3. Use the interface
1. URL format
The URL format of the universal interface is:
<code>http://yourwebsite.com/e/api/接口名称.php?参数1=值1&参数2=值2...</code>
For example, to obtain the titles of all articles with column ID 1, the URL is:
<code>http://yourwebsite.com/e/api/example_api.php?classid=1&fields=title</code>
2. Parameter description
3. Return result
Universal interface returns results in JSON format, including the following fields:
For example:
<code class="json">{ "total": 10, "page": 1, "pagesize": 10, "data": [ { "title": "文章标题1", "newstime": "2023-03-08 10:00:00" }, { "title": "文章标题2", "newstime": "2023-03-09 11:00:00" } ] }</code>
The above is the detailed content of Why can't I use the empire cms universal interface?. For more information, please follow other related articles on the PHP Chinese website!