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

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


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


Ïà¹ØÎĵµ£º

xmlÎĵµÀﺬÓÐÌØÊâ×Ö·ûʱµÄ´¦Àí·½·¨(php)

¡¡¡¡±¾ÎÄÊ×·¢´úÂëÌìÏÂ,×ªÔØÇë×¢Ã÷À´Ô´´úÂëÌìÏ£¬Ð»Ð»¡£
¡¡¡¡½ñÌìÉϰàʱÓöµ½Ò»¸öÎÊÌ⣬ÓÎÏ·¹Ù·´Ó¦Ò»¸öÓû§³ä²»ÁËÖµ¡£³ä²»ÁËÖµÒ»°ãΪÓû§½ÇÉ«²»ÕýÈ·£¬ÎÒ×Ðϸ¼ì²é·¢ÏÖ¸ÃÓû§½ÇÉ«ÓеãÒì³££¬ÒòΪ¶Ô·½·µ»Ø½ÇÉ«ÊÇxml£¬ÎÒÌùÉÏÀ´¸ø´ó¼Ò¿´Ò»Ï£º
<Result value="true" message="Success!">   <It ......

PHPÖÐÈ«¾Ö±äÁ¿µÄʹÓÃ

<?php
 
 
  //ÉùÃ÷È«¾Ö±äÁ¿
  $num = "ÕÅÈý";
 
  //¶¨ÒåÒ»¸ö×Ô¶¨Òå·½·¨
  function my_fun($temp1,$temp2 = "people"){
   //ÒªÊýÓ÷½·¨ÍⲿÉùÃ÷µÄÈ«¾Ö±äÁ¿,±ØÐëʹÓùؼü×ÖglobalÏÈÔÚ
   //×Ô¶¨Òå·½·¨ÖлñµÃµ½·½·¨ÍⲿÉùÃ÷µÄÈ«¾Ö±äÁ¿µÄÖµ£¬²ÅÄÜÔÚ·½ ......

ºÃÓõÄphp¹ýÂËÌØÊâ×Ö·û

function htmldecode($str)
{
if(empty($str)) return;
if($str=="") return $str;
$str=str_replace("&",chr(34),$str);
$str=str_replace(">",">",$str);
$str=str_replace("<","<",$str);
$str=str_replace("&","&",$str);
$str=str_replace(" ",chr(32),$str);
$str=str_replace(" ", ......

PHPÒ³Ãæ±àÂëͳһ

MySQLÊý¾Ý¿â±àÂë¡¢htmlÒ³Ãæ±àÂë¡¢PHP»òhtmlÎļþ±¾Éí±àÂëҪȫ²¿Ò»Ö¡£
1¡¢MySQLÊý¾Ý¿â±àÂ룺½¨Á¢Êý¾Ý¿âʱָ¶¨±àÂ루Èçgbk_chinese_ci)£¬½¨Á¢Êý¾Ý±í¡¢½¨Á¢×ֶΡ¢²åÈëÊý¾Ýʱ²»ÒªÖ¸¶¨±àÂ룬»á×Ô¶¯¼Ì³ÐÊý¾Ý¿âµÄ±àÂë¡£
Êý¾Ý¿âÁ¬½Óʱ£¬Ò²ÓбàÂ룬¿ÉÒÔÔÚÁ¬½ÓÍêÊý¾Ý¿âºó£¬Ö´ÐÐ
mysql_query(‘SET NAMES gbk’);//½«gbk» ......

php»·¾³´î½¨


µÚÒ»²½£ºÏÂÔØ°²×°³ÌÐò
£¨1£© Apache2.2.4°æÏÂÔØ£¬µØÖ·£ºhttp://httpd.apache.org/download£¬Ñ¡Ôñ
apache_2.2.4-win32-x86-no_ssl.msi£¬´óÔ¼4M¶à¡£
£¨2£©PHP5.2.3°æÏÂÔØ£¬ µØÖ·£ºhttp://www.php.net/downloads.php£¬Ñ¡ÔñWindows BinariesÏÂÃæµÄPHP5.2.3.zip package£¬Ëü¶ÔÓ¦php-5.2.3-Win32.zipÎļþ£¬´óÔ¼9M¶à¡£
µÚ¶þ² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ