The Security Helper file contains security related functions.
This helper is loaded using the following code:
helper('security');
The following functions are available:
sanitize_filename($filename) | Parameters: |
|
|---|---|
| Returns: |
Sanitized file name |
| Return type: |
string |
Provides protection against directory traversal.
This function is an alias for \CodeIgniter\Security::sanitizeFilename(). For more info, please see the Security Library documentation.
| Parameters: |
|
|---|---|
| Returns: |
The input string with no image tags |
| Return 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: |
|
|---|---|
| Returns: |
Safely formatted string |
| Return type: |
string |
This is a security function that converts PHP tags to entities.
Example:
$string = encode_php_tags($string);
© 2014–2020 British Columbia Institute of Technology
Licensed under the MIT License.
https://codeigniter.com/user_guide/helpers/security_helper.html