WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World
Sets the current active configuration setting of magic_quotes_runtime

set_magic_quotes_runtime

(PHP 4, PHP 5)

set_magic_quotes_runtimeSets the current active configuration setting of magic_quotes_runtime

Description

bool set_magic_quotes_runtime ( bool $new_setting )

Set the current active configuration setting of magic_quotes_runtime.

Parameters

new_setting

FALSE for off, TRUE for on.

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example #1 set_magic_quotes_runtime() example

<?php
// Create a temporary file pointer
$fp tmpfile();

// Write some data to the pointer
fwrite($fp'\'PHP\' is a Recursive acronym');

// Without magic_quotes_runtime
rewind($fp);
set_magic_quotes_runtime(false);

echo 
'Without magic_quotes_runtime: ' fread($fp64), PHP_EOL;

// With magic_quotes_runtime
rewind($fp);
set_magic_quotes_runtime(true);

echo 
'With magic_quotes_runtime: ' fread($fp64), PHP_EOL;

// Clean up
fclose($fp);
?>

The above example will output:

 Without magic_quotes_runtime: 'PHP' is a Recursive acronym With magic_quotes_runtime: \'PHP\' is a Recursive acronym 

See Also


How to avoid the slashes (\) when retriving information from sql when MagicQuotes are on?
Categories : Strings, PHP
Tired to edit forms? this simple script will edit or update ANY MySQL database.It can handle set, enum, textarea and creat and update date fields data.
Categories : MySQL, Databases, PHP
PHP Youtube Downloader - This is a set of PHP functions that can be used to download movies from Youtube.com.
Categories : PHP, CURL, Regexps



Functions for calculating sunrise/sunset, twilight * length of day based on latitude / longituse & date
Categories : Date Time, PHP, Complete Programs
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0
Categories : PHP, Sessions, Databases, MySQL
stock, quotes, finance, financial, level
Categories : PHP, Complete Programs
This provides a drop down form for searching with different search engines. All the encoding/arguments are set by the program as need for each supported search engine (currently 18)
Categories : HTML, Search
Functions to access a NNTP/NNRP newsserver. Complete set with examples is at ftp://ftp.nederland.net/pub/nnrplib
Categories : Search, PHP, Complete Programs
javascript cookie settings
Categories : Java Script, Beginner Guides
A simple configuration file editor to ease you life in setting up php applications. Reads variables from a given file automatically and displays current value. New value will be written to file after submit.
Categories : PHP, Filesystem, Regexps, Java Script
Object() = Custom __autoload + Singleton. "automagically" instantiates a class and always retuns the same instance of the same class. It's pretty useful when you want to have persistence in objects.
Categories : PHP, PHP Classes, Algorithms
Record Set Paging with PHP (RSP)
Categories : PHP, MySQL, Navigation, Databases, HTML and PHP
'Ripple Banner' text effect - This sequentially changes the color of each character in a text string. When all characters have been changed the text string reverts to the original set color.
Categories : Java Script
Function that allows a Javascript cookie to be set after HTML has been outputted to the page.
Categories : PHP, Java Script, Cookies, HTML and PHP