Home > Backend Development > PHP Tutorial > php code to get global variables_PHP tutorial

php code to get global variables_PHP tutorial

WBOY
Release: 2016-07-21 15:30:17
Original
1050 people have browsed it

复制代码 代码如下:

function cleanGlobal($global_array, $arg, $specialchars = true, $default = null) {
        if(key_exists($arg, $global_array) && $global_array[$arg] != null && $global_array[$arg] != "") {
                if($specialchars) {
                        return htmlspecialchars($global_array[$arg]);
                } else {
                        return $global_array[$arg];
                }
        } else {
                return $default;
        }
}

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/323298.htmlTechArticle复制代码 代码如下: function cleanGlobal($global_array, $arg, $specialchars = true, $default = null) { if(key_exists($arg, $global_array) $global_array[$arg] != null $global...
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