Home > Article > CMS Tutorial > 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.
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!