Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the core package of Imperial cms universal API secondary development?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

What is the core package of Imperial cms universal API secondary development? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.

Brief introduction

Imperial cms Universal API secondary development core package is a secondary development package that can be used to develop WeChat Mini Programs, Baidu Mini Program, Alipay Mini Program, Light App, Apple ios Android android and other marketing plug-ins. The current version is based on Imperial cms 7.5utf-8 version, and other versions are not available for the time being. If necessary, you can download this package and transcode it.

Characteristics

1. Do not modify the core code of Imperial cms to facilitate Imperial upgrade

two。 The call is simple and convenient, and encapsulates the database operation of Imperial cms.

Installation

After downloading, it consists of two parts, one is the secondary development core library lskcore, the other is the api external interface function library lskapp. Just put these two folders in the / e/extend/ directory.

Content contains

1. Imperial cms universal API secondary development core package lskapp

2.lskapp general api program extension library.

Core package function description lsk::getrow ($tbname,$id)

Select a record from the data table

$tbname:// does not include dropouts, such as order

$id://. If the default is id, you can write it directly. For example, 1m classid'= ID can also be conditional data, such as array ('data > 1).

Example: lsk::getrow ('ecms_news',array (' classid'= > 1)); / / get a record with a classification of classid of 3 and an information of id of 3 from the news table.

Lsk::getinfo ($classid,$id)

Read a record from the model table. Unlike the above lsk::getrow, lsk::getrow can read the record of any table. The function lsk::getinfo reads according to the information table in the column, because the column information of Imperial cms contains classid and id, different models, and the main and negative tables stored in the table field. We encapsulate this operation, and all we need to read a record is classid,id.

Lsk::get ($varname)

Gets the get parameter, and if $varname is empty, gets the get array

Lsk::post ($varname)

Gets the post parameter, and if $varname is empty, gets the post array

Lskapp generic api API description call method

Http:// domain name / e/extend/lskapp/api.php?at=api name

Development specification

The following is the recommended development convention.

The 1.api file is uniformly placed in the lskapp/apilist/ directory, and only one level of directory is supported under it, that is, a new directory ttnews under apilist, and an interface file, news_getinfo.php, is established under it. Something like this.

two。 For a mini application, it is recommended to create a new folder, such as Jinri Toutiao. You can create a ttnews directory under the lskapp/apilist directory to provide Jinri Toutiao data exclusively.

3. In the interface php file, the function of opening the core package can be called directly. The default has been introduced.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report