Filter

Tässä on erilaisia filter funktiota/ komentoja!


Nimi Selite Oletus
Muokattava
Esimerkki
filter.default Filter all $_GET, $_POST, $_COOKIE, $_REQUEST and $_SERVER data by this filter. Accepts the name of the filter you like to use by default. See the filter list for the list of the filter names "unsafe_raw"
PHP_INI_PERDIR
Esim
filter.default_flags Default flags to apply when the default filter is set. This is set to FILTER_FLAG_NO_ENCODE_QUOTES by default for backwards compatibility reasons NULL
PHP_INI_PERDIR
Esim



Funktio Selite Esimerkki
filter_has_var() Checks if a variable of a specified input type exist Esim
filter_id() Returns the filter ID of a specified filter name Esim
filter_input() Gets an external variable (e.g. from form input) and optionally filters it Esim
filter_input_array() Gets external variables (e.g. from form input) and optionally filters them Esim
filter_list() Returns a list of all supported filters Esim
filter_var_array() Gets multiple variables and filter them Esim
filter_var() Filters a variable with a specified filter Esim



Funktio ID
Selite
Esimerkki
FILTER_VALIDATE_BOOLEAN 258
Validates a boolean
Esim
FILTER_VALIDATE_EMAIL 274
Validates an e-mail address
Esim
FILTER_VALIDATE_FLOAT 259
Validates a float
Esim
FILTER_VALIDATE_INT 257
Validates an integer
Esim
FILTER_VALIDATE_IP 275
Validates an IP address
Esim
FILTER_VALIDATE_REGEXP 272
Validates a regular expression
Esim
FILTER_VALIDATE_URL 273 
Validates a URL
Esim
FILTER_SANITIZE_EMAIL 517
Removes all illegal characters from an e-mail address
Esim
FILTER_SANITIZE_ENCODED 514
Removes/Encodes special characters
Esim
FILTER_SANITIZE_MAGIC_QUOTES 521
Apply addslashes()
Esim
FILTER_SANITIZE_NUMBER_FLOAT 520
Remove all characters, except digits, +- and optionally .,eE
Esim
FILTER_SANITIZE_NUMBER_INT 519
Removes all characters except digits and + -
Esim
FILTER_SANITIZE_SPECIAL_CHARS 515
Removes special characters
Esim
FILTER_SANITIZE_FULL_SPECIAL_CHARS  
 
Esim
FILTER_SANITIZE_STRING 513
Removes tags/special characters from a string
Esim
FILTER_SANITIZE_STRIPPED 513
Alias of FILTER_SANITIZE_STRING
Esim
FILTER_SANITIZE_URL 518
Removes all illegal character from s URL
Esim
FILTER_UNSAFE_RAW 516
Do nothing, optionally strip/encode special characters
Esim
FILTER_CALLBACK 1024
Call a user-defined function to filter data
Esim