易截截图软件、单文件、免安装、纯绿色、仅160KB

php函数get_magic_quotes_gpc详解

set_magic_quotes_runtime是用来设置PHP 环境配置的变量 magic_quotes_runtime 值。
0-关闭 1-打开
程序中检测状态用get_magic_quotes_runtime,返回 0 表示关闭本功能;返回 1 表示本功能打开。若
magic_quotes_runtime 打开时,所有外部引入的数据库资料或者文件等等都会自动转为含有反斜线溢出字符的资料。

函数取得 PHP 环境配置的变量 magic_quotes_gpc (GPC, Get/Post/Cookie) 值。返回 0
表示关闭本功能;返回 1 表示本功能打开。当 magic_quotes_gpc 打开时,所有的 ' (单引号), " (双引号), \
(反斜线) and 空字符会自动加上转义符\;
默认情况下,PHP 指令magic_quotes_gpc为 on
,它主要是对所有的 GET、POST 和 COOKIE (即G P C)数据自动运行 addslashes()
。不要对已经被
magic_quotes_gpc
转义过的字符串使用 addslashes()
,因为这样会导致双层转义。遇到这种情况时可以使用函数 
get_
magic_quotes_gpc()
进行检测。

其实这个函数就是判断有PHP有没有自动调用addslashes
这个函数,
下面是例子,其实也是从手册上弄下来的,传过来就为自己看着方便,因为自己记性不好..
<
html
>
    <!--以POST方式传过去一个带有单引号的字符串 -->
    
<
body
>
         
<
form

action
="first.php"

method
="post"
>
              
<
input

type
="text"

name
="lastname"

value
="Simao'pig"
>
              
<
input

type
="submit"

value
="提交"
>
         
</
form
>
    
</
body
>
    
    
</
html
>
<?php

echo
get_magic_quotes_gpc
();  &nb


相关文档:

PHP获取浏览器信息(三种)

转自本人个人网站 【PHP探路者
】,欢迎各位访问站点!
在使用PHP获取浏览器信息时,通常有两种方式:
第一种是:使用$_SERVER[HTTP_USER_AGENT]选项
此方式获取的是格式不规则的数据,如
Mozilla/4.0 (compatible; MSIE 8.0
; Windows NT 5.1; Trident/4.0; GTB6; CIBA; .NET CLR 2.0.50727)
Mozilla/5.0 (Windows ......

php session新手入门教程

 
Session简介
session 分成两部分,session空间存放于服务器端,打开空间的ID 存放于 客户端的cookie, 如果客户端关闭了cookie,session就不能正常的使用。
Session的中文译名叫做“会话”,其本来的含义是指有始有终的一系列动作/消息,比如打电话时从拿起电话拨号到挂断电话这中间的一系列过程可以称 ......

php里如何把字符串转换成字符数组

 解决的办法有好几个:
第一个是:str_split(),这个方法是PHP5加入的。
<?php
$str = "Hello Friend";
$arr1 = str_split($str);
$arr2 = str_split($str, 3);
print_r($arr1);
print_r($arr2);
?>
输出就是:
Array
(
[0] => H
[1] => e
[2] => l
[3] => l
......

PHP 中巧用数组降低程序的时间复杂度

OpenX adserver version 2.8.1 and lower is vulnerable to remote code
execution. To be exploited, this vulnerability requires banner / file
upload permissions, such as granted to the 'advertiser' and
'administrator' roles.
This vulnerability is caused by the (insecure) file upload mechanism of
af ......

一php大马,值得研究

<?php
#--Config--#
$login_password= '123456'; //这是密码
#----------#
error_reporting(E_ALL);
set_time_limit(0);
ini_set("max_execution_time","0");
ini_set("memory_limit","9999M");
set_magic_quotes_runtime(0);
if(!isset($_SERVER))$_SERVER = &$HTTP_SERVER_VARS;
if(!isset($_POST))$_PO ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号