Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

security.magicquotes.disabling function syntax tag tutorial 2013 Donate at flattr Flattr this





Alert! Connect with 10,000 Chating Online. Join Now

Php security.magicquotes.disabling () function

Write your php code

 
<?php ?>

Php Result


Your code below



Disabling Magic Quotes

The magic_quotes_gpc directive may only be disabled at the system level, and not at runtime. In otherwords, use of ini_set() is not an option.

Example 31-1. Disabling magic quotes server side

An example that sets the value of these directives to Off in php.ini. For additional details, read the manual section titled How to change configuration settings.

; Magic quotes
;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off

If access to the server configuration is unavailable, use of .htaccess is also an option. For example:

php_flag magic_quotes_gpc Off

In the interest of writing portable code (code that works in any environment), like if setting at the server level is not possible, here's an example to disable magic_quotes_gpc at runtime. This method is inefficient so it's preferred to instead set the appropriate directives elsewhere.

Example 31-2. Disabling magic quotes at runtime

<?php
if (get_magic_quotes_gpc()) {
    function
stripslashes_deep($value)
    {
        
$value = is_array($value) ?
                    
array_map('stripslashes_deep', $value) :
                    
stripslashes($value);

        return
$value;
    }

    
$_POST = array_map('stripslashes_deep', $_POST);
    
$_GET = array_map('stripslashes_deep', $_GET);
    
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
?>

Php security.magicquotes.disabling Function syntax tag

security.magicquotes.disabling php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php security.magicquotes.disabling syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online