Security Helper
The Security Helper file contains security related functions.
Loading this Helper
This helper is loaded using the following code:
- helper('security');
Available Functions
The following functions are available:
Parameters:
- $filename (string) – FilenameReturns:Sanitized file nameReturn type:string
Provides protection against directory traversal.
This function is an alias for \CodeIgniter\Security::sanitize_filename()
.For more info, please see the Security Librarydocumentation.
Parameters:
- $str (string) – Input stringReturns:The input string with no image tagsReturn type:string
This is a security function that will strip image tags from a string.It leaves the image URL as plain text.
Example:
- $string = strip_image_tags($string);
Parameters:
- $str (string) – Input stringReturns:Safely formatted stringReturn type:string
This is a security function that converts PHP tags to entities.
Example:
- $string = encode_php_tags($string);
当前内容版权归 codeigniter4 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 codeigniter4 .