set_magic_quotes_runtime

bool set_magic_quotes_runtime(int setting Value) 

Modifies magic_quotes_runtime.

Returns:

TRUE on success; FALSE on failure

Description:

Toggles the configuration of the magic_quotes_runtime directive for escaping quote marks in strings returned from sources such as databases. Turning on the directive magic_quotes_runtime removes the need for using the add_slashes() function. A single backslash is automatically placed in front of any backslashes or quotes that exist in any string argument. Null bytes are converted to \0.

Version:

Existing since version 3.0.6

Example:

Turn on magic_quotes_runtime
set_magic_quotes_runtime(1); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.