The built-in variable filtering function in EmpireCMS is frequently used during secondary development or when creating templates; mastering this function means you won't need to write your own filtering method – saving you a significant amount of code!
(1) Numeric variables can be processed with the (int) or intval function, example:
$page=(int)$_GET['page'];
或
$page=intval($_GET['page']);
(2) Numeric variables with decimal points can be processed with the (float) or floatval function. Example:
$money=(float)$money;
或
$money=floatval($money);
(3) Character type processing:
Without spaces or other special symbols, use
RepPostVar()Function Filtering
With spaces or other special symbols use:RepPostVar2()Function Filtering
To write to the database:
RepPostStr()Function Filtering