How to fix the problem that the $_SERVER variable is no longer protected by magic_quotes_gpc under PHP5_PHP Tutorial

WBOY
Release: 2016-07-21 15:15:15
Original
801 people have browsed it

Copy code The code is as follows:

$magic_quotes_gpc = get_magic_quotes_gpc();
@ extract(daddslashes($_COOKIE));
@extract(daddslashes($_POST));
@extract(daddslashes($_GET));
if(!$magic_quotes_gpc) {
$_FILES = daddslashes($_FILES);
}

daddslashes function
Copy code The code is as follows:

//Translation character function
function daddslashes($string) {
if(!is_array($string)) return addslashes($string);
foreach($string as $key => ; $val) $string[$key] = daddslashes($val);
return $string;
}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326172.htmlTechArticleCopy the code as follows: ?php $magic_quotes_gpc = get_magic_quotes_gpc(); @extract(daddslashes($_COOKIE)); @extract(daddslashes($_POST)); @extract(daddslashes($_GET)); if(!$magic...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!