Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php ×Ö·û´®°²È«¹ýÂË È«¹¥ÂÔ

<?php
if (!get_magic_quotes_gpc()) {
add_slashes($_GET);
add_slashes($_POST);
add_slashes($_COOKIE);
}

function add_slashes($string) {
if (is_array($string)) {
foreach ($string as $key => $value) {
$string[$key] = add_slashes($value);
}
} else {
$string = addslashes($string);
}
return $string;
}
//php·À×¢È뺯Êý,×Ö·û¹ýÂ˺¯Êý
//½âÂë
function htmldecode($str)
{
if(empty($str)) return;
if($str=="") return $str;
$str=str_replace("select","select",$str);
$str=str_replace("join","join",$str);
$str=str_replace("union","union",$str);
$str=str_replace("where","where",$str);
$str=str_replace("insert","insert",$str);
$str=str_replace("delete","delete",$str);
$str=str_replace("update","update",$str);
$str=str_replace("like","like",$str);
$str=str_replace("drop","drop",$str);
$str=str_replace("create","create",$str);
$str=str_replace("modify","modify",$str);
$str=str_replace("rename","rename",$str);
$str=str_replace("alter","alter",$str);
$str=str_replace("cas","cast",$str);
$str=str_replace("&","&",$str);
$str=str_replace(">",">",$str);
$str=str_replace("<","<",$str);
$str=str_replace(" ",chr(32),$str);
$str=str_replace(" ",chr(9),$str);
// $str=str_replace("    ",chr(9),$str);
$str=str_replace("&",chr(34),$str);
$str=str_replace("'",chr(39),$str);
$str=str_replace("<br />",chr(13),$str);
$str=str_replace("''","'",$str);
return $str;
}
//±àÂë
function htmlencode($str)
{
if(empty($str)) return;
if($str=="") return $str;
$str=trim($str);
$str=str_replace("&","&",$str);
$str=str_replac


Ïà¹ØÎĵµ£º

php×Ö·û´®º¯ÊýµÄ´óÈ«

PHP×Ö·û´®º¯Êý´óÈ«
AddSlashes: ×Ö·û´®¼ÓÈëбÏß¡£
bin2hex: ¶þ½øλת³ÉÊ®Áù½øλ¡£
Chop: È¥³ýÁ¬Ðø¿Õ°×¡£
Chr: ·µ»ØÐòÊýÖµµÄ×Ö·û¡£
chunk_split: ½«×Ö·û´®·Ö³ÉС¶Î¡£
convert_cyr_string: ת»»¹Å˹À­·ò×Ö·û´®³ÉÆäËü×Ö·û´®¡£
crypt: ½«×Ö·û´®Óà DES ±àÂë¼ÓÃÜ¡£
echo: Êä³ö×Ö·û´®¡£
explode: Çпª×Ö·û´®¡£
flush: Çå ......

php Ìæ»»·Ç·¨×Ö·û ±£´æµ½Êý¾Ý¿â


function _processBeforeDb($str)
{
$str = str_replace ( array ('<', '>' ), array ('&lt;' , '&gt;' ), $str );
if (!get_magic_quotes_runtime()){
return addslashes($str);
}
else
{
return $str;
}
}
......

PHP ³£Á¿ dirname(__file__)

PHP ³£Á¿ dirname(__file__) ѧϰ
2008Äê09ÔÂ02ÈÕ ÐÇÆÚ¶þ 15:42
PHP ³£Á¿ dirname(__file__)
__FILE__ :±»³ÆΪPHPħÊõ³£Á¿ ,·µ»Øµ±Ç°Ö´ÐÐPHP½Å±¾µÄÍêÕû·¾¶ºÍÎļþÃû,°üº¬Ò»¸ö¾ø¶Ô·¾¶
1£©dirname(__FILE__) º¯Êý·µ»ØµÄÊǽű¾ËùÔÚÔڵķ¾¶¡£   
±ÈÈçÎļþ b.php °üº¬ÈçÏÂÄÚÈÝ£º     ......

php ÖÐÇÉÓà @ ȦA Ȧa Îļþ²Ù×÷ ¾¯¸æ

¶ÔÓÚ³õѧÕßÀ´Ëµ£¬ÎÒÃÇÓÐʱºò»á¿´¼ûPHPÖÐÓÐÕâÑùµÄд·¨£º
@ unlink($filepath);
Ò²¿ÉÒÔд³É£º
unlink($filepath);
²»Ã÷°×ÕâÁ½ÖÖд·¨ÓÐʲôÇø±ð£¬±íÃæÉÏ£¬³ÌÐòÔËÐÐÆðÀ´ËƺõûʲôÇø±ð¡£
ʵ¼ÊÉÏ£¬¼ÓÉÏ@·ûºÅ£¬ÓÐÒÖÖÆ´íÎóÏÔʾµÄ¹¦ÄÜ¡£
¾ÍÄÃÉÏÃæµÄ´úÂëÀ´Ëµ£¬È¥µô@ʱ£¬
Èç¹û±»É¾³ýµÄÎļþ²»´æÔڵĻ°£¬Ôò»áÏÔʾÎļþ²»´æÔڵĴíÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ