


Analyze the common functions in the core file e/class/connect.php of the Empire CMS
The e/class/connect.php file under Imperial CMS contains some core functions commonly used in Imperial CMS. Deepen your understanding of the commonly used functions in the connect.php file. For Imperial CMS It is very important for secondary development.
The commonly used functions in the connect.php file of Empire CMS are excerpted as follows for your reference:
The code is as follows:
esub($string,$length,$dot='');//截取字符串函数,第三个参数为超过长度以后,在后面添加的字符串 make_password($pwd_length);//取得随机数 db_connect();//数据库连接 DoSetDbChar($dbchar);///设置数据库编码 db_close();//关闭数据库 esetcookie($var,$val,$life=0;$ecms=0);//设置cookie getvar($var,$ecms=0);//取得cookie printerror($error="",$gotourl="",$ecms=0;$noautourl=0;$novar=0;);//打印错误信息(对于运行成功的情况下也可调用该函数 执行js跳转!) egetip();取得ip地址 DoingReturnUrl($url,$from='');//返回地址 RepPostVar($var);//参数处理函数 GetFiletype($filename);//取得文件扩展名 RepGetFiletype($filetype);//文件名特殊字符(| , .等)过滤 GetFilename($filename);//取得文件名 sub($string,$start=0,$length,$mode=false,$dot='');//字符串截取函数$mode默认即可 no_make_password($pw_length);//取得随机数,这个是取得数字的 ToReturnRGB($reg);//颜色转rgb,#ff0000-->rgb(32,23,32) page1($num,$line,$page_line,$start,$page,$search);//前台分页 to_time($datetime);//时间转换函数 date_time($time,$format="Y-m-d H:i:s");//时间转日期函数 format_datetime($newstime,$format);//格式化日期 to_date($date);//时间转换 ReadFiletext($filepath);//取得文件内容,网络文件本地文件都可以 DoTitleFont($titlefont,$title);//格式化标题,增加一些粗体 SubSmalltextVal($value,$len);//截取简介 SubSchallSmalltext($value,$len);//全站搜索简介
It is recommended to study "Empire cms tutorial 》
In addition, for those who want to know more about the underlying functions of the Empire CMS, you can download the phpxref tool of this site: https://www.jb51.net/softs/58474.html to further query and analyze each Function definition and calling method!
The above is the detailed content of Analyze the common functions in the core file e/class/connect.php of the Empire CMS. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version
Visual web development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.