Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : PHP Options&Information : set_magic_quotes_runtime

set_magic_quotes_runtime

Sets the current active configuration setting of magic_quotes_runtime (PHP 4, PHP 5)
bool set_magic_quotes_runtime ( int new_setting )

Examples ( Source code ) » set_magic_quotes_runtime

set_magic_quote_runtime(1) is  very userful for copying data
from one table to another table in mysql when there are many columns need addslashes 

<?php
     set_magic_quote_runtime
(1);
?>

Code Examples / Notes » set_magic_quotes_runtime

tilman dot schroeder

To php at nospam-qualystem dot com:
For your purposes it's easier to open the file in binary mode (fopen("file.txt","wb")) than setting magic_quotes_runtime to off ;)


yanshuldg

set_magic_quote_runtime(1) is  very userful for copying data from one table to another table in mysql when there are many columns need addslashes

warhog

I think the post below is useless here..
magic_quotes_runtime is not magic_quotes_gpc.. when magic_quotes_runtime is enabled (on, =1, true), then every function call working with some kind of database will return strings with slashes (like addslashes everytime you call such a function). magic_quotes_gpc instead is what is meant in the post below - and in fact, magic_quotes_runtime does not do anything to it. but if there existed some function like set_magic_quotes_gpc it would not do anything too, the reason is mentioned below..
so if you're searchin' for a way to turn off quotes_gpc than set the directive in the INI-File or with the help of the php_value-flag of mod_php, when php is compiled as an apache module, inside of an .htaccess-file (PERDIR-configuration). otherwise you really have to check wether quotes_gpc is enabled or not and than add addslashes or stripslashes as you need on the input-variables.
and as mentioned in the post below that one belows this one ( -.- ) magic_quotes_runtime is mostrly useless too..


php

get_magic_quotes runtime and set_magic_quotes_runtime are useful when you want to read some data in a binary file using fread() and some bytes in such file may be interpreted as \ (backslash), " (double quotes), ' (simple quote) or any "special" character that has a meaning for string processing.

Change Language


Follow Navioo On Twitter
assert_options
assert
dl
extension_loaded
get_cfg_var
get_current_user
get_defined_constants
get_extension_funcs
get_include_path
get_included_files
get_loaded_extensions
get_magic_quotes_gpc
get_magic_quotes_runtime
get_required_files
getenv
getlastmod
getmygid
getmyinode
getmypid
getmyuid
getopt
getrusage
ini_alter
ini_get_all
ini_get
ini_restore
ini_set
main
memory_get_peak_usage
memory_get_usage
php_ini_scanned_files
php_logo_guid
php_sapi_name
php_uname
phpcredits
phpinfo
phpversion
putenv
restore_include_path
set_include_path
set_magic_quotes_runtime
set_time_limit
sys_get_temp_dir
version_compare
zend_logo_guid
zend_thread_id
zend_version
eXTReMe Tracker