You are on page 1of 2

set_magic_quotes_runtime()

<?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($fp, 64), PHP_EOL;

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

echo 'With magic_quotes_runtime: ' . fread($fp, 64), 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

Description
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.

*** Argument supplied in function 1 for true and 0 for false.***

stripslashes()

Example #2 Using stripslashes() on an array

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

// Example
$array = array("f\\'oo", "b\\'ar", array("fo\\'o", "b\\'ar"));
$array = stripslashes_deep($array);

// Output
print_r($array);
?>

This is the code which automatically redirect u another page


approximately after 12 second.. u need to give page name only
And put this tag above all.

<meta http-equiv="refresh" content="12;


URL=http://www.wmioil.com/employees/employees.html">

You might also like