search
HomeCMS TutorialEmpire CMSWhat are the basic issues in the secondary development of Imperial CMS?

What are the basic issues in the secondary development of Imperial CMS?

Nov 06, 2019 pm 05:42 PM
Secondary developmentEmpire cms

What are the basic issues in the secondary development of Imperial CMS?

#1. If the "Close all dynamic pages in the foreground" option is turned on, how can the secondary development files be accessed?

You can add:

define('EmpireCMSAdmin','1');

to the top of the developed program code to avoid being affected by this setting.

2. How is the path to the language pack file imported by LoadLang() expressed?

The address of the imported language package file is relative to the ../data/language/ directory, example:

1. If the program file is in the /e/extend/ directory, for example: / e/extend/a.php, you can use:

require LoadLang('pub/fun.php');

2. If the program file is in the /e/extend/helloworld/ directory, for example: /e/extend/helloworld/a.php, Then you can use the language pack to import:

require '../'.LoadLang('pub/fun.php');

3. If the program file is in the root directory, such as: /a.php, you can use the language pack to import:

require ECMS_PATH.'e/data/'.LoadLang('pub/fun.php');

3. $ How is the editor declaration of directory level variables represented?

This variable does not need to be set if you do not use functions such as printerror().

The default $editor variable is 0.

When the program file is in the /e/path/ directory, $editor does not need to be set, that is, the default 0 is used.

When the program file is in the /e/path/path2/ directory, $editor=1.

When the program file is in the /e/path/path2/path3/ directory, $editor=2.

When the program file is in the /e/path/path2/path3/path4/ directory, $editor=3.

4. Introduction to imported files

Import column, topic, and title classification cache files: /e/data/dbcache/class.php

Import the member group cache file: /e/data/dbcache/MemberLevel.php

Import the tag function file: /e/class/t_functions.php

Import the compiled tag file: /e/class/functions.php

##5. Recommended variable filtering

1. Numeric variables can be processed with the (int) or intval function. Example:

$page=(int)$_GET['page'];

or

$page=intval($_GET['page']);

2. Numeric variables with decimal points can be processed with the (float) or floatval function. , Example:

$money=(float)$money;

or


$money=floatval($money);

3. Character type processing:

without spaces or other special symbols use

RepPostVar()Function filtering; use the RepPostVar2() function to filter those with spaces or other special symbols; use the RepPostStr() function to filter those written to the database.

Recommended tutorial:

Empire CMS Tutorial

The above is the detailed content of What are the basic issues in the secondary development of Imperial CMS?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows

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.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)