PHP½«Ð¡Ð´¸Ä³É´óд½ð¶î
<?
error_reporting(2047);#±¨¸æËùÓзǷ¨µÄ´íÎó
ob_start();
function RMB ($RMB=0,$Format='') {
/*
*/
$RMB=@preg_Replace(
array('/([, ]|£¤|0$|)/','/(.){2,}/'),
array('','.'),
$RMB);
if(eregi("[^0-9.]",$RMB))return "·Ç·¨½ð¶î";
if($RMB==0)return "ÁãÔªÕû";
elseif($RMB>pow(10,12))return "½ð¶î±ØÐëСÓÚǧÒÚ";
$re = '';
$arr1 = array('Áã','Ò¼','·¡','Èþ','ËÁ','Îé','½','Æâ','°Æ','¾Á');
$arr2 = array('Ôª','Ê°','°Û','Ǫ','Íò','Ê°','°Û','Ǫ','ÒÚ','Ê°','°Û','Ǫ');
$arr3 = array('½Ç','·Ö','Àå','ºÁ');
$pre1 = count($arr2); #µ¥Î»¾«È·¶È precision
$pre2 = count($arr3); #СÊýλ¾«È·¶È precision
$arr = @explode(".",$RMB);#°´Ð¡ÊýµãÇиî½ð¶î
$len1 = @strlen($arr[0]); #ÕûÊý볤¶È
$len2 = @strlen($arr[1]); #СÊý볤¶È
for($i=0; $i<$len1 && $i<$pre1; $i++)
{
$bit =$arr[0][$len1-$i-1]; #µ±Ç°Î»Ð¡Ð´½ð¶î
$cn =$arr1[$bit]; #µ±Ç°Î»´óд½ð¶î
$unit =$arr2[$i];
#µ±Ç°Î»½ð¶îµ¥Î»
#Сд½ð¶îΪÁãµÄÇé¿ö
if($bit==0)
{
if(ereg('Ôª|Íò|ÒÚ',$unit))$re=$unit.$re;
else $re=$cn.$re;
}
#Сд½ð¶î·ÇÁãµÄÇé¿ö
else
{
$re=$cn.$unit.$re;
}
}
for($i=0; $i< count($arr3) && $i<$len2; $i++){
$bit =$arr[1][$i]; #µ±Ç°Î»Ð¡Ð´½ð¶î
$cn =$arr1[$bit]; #µ±Ç°Î»´óд½ð¶î
$unit =$arr3[$i]; #µ±Ç°Î»½ð¶îµ¥Î»
if($bit!=0) $re .=$cn.$unit;
elseif($i<2) $re .="Áã";
}
if($Format){#¸ñʽ»¯Ð¡Ð´½ð¶î
#¾«È·Î»Êý¡£²»Ð¡ÓÚ2£¬²»´óÓÚ×î´ó¾«È·¶ÈµÄСÊýλÊý
$gage =min(max(2,$len2),$pre2);
$GLOBALS[$Format]=number_format($RMB,$gage, ".", ",");
}
$re=preg_replace(
array("/ÒÚÍò/", "/(Áã)$/", "/(Áã){2,}/"),
array("ÒÚ", "",
Ïà¹ØÎĵµ£º
¸ãÁ˺ܾᣡ£ÖÕÓÚ·¢ÏÖÔÀ´ÊÇȨÏÞÎÊÌâ¡£¡£
2ÐÐÃüÁî¸ã¶¨
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
¾µäÁË¡£¡£¡£
ħÁ¦Ë½·þÍøÒ³¶Ë¸ã¶¨¿©~~ ......
PHP»º´æ¼¼ÊõÏê½â
Ò»¡¢»º´æ¼¼Êõ:
ÓÐЩÐÅÏ¢±È·½¾³£²»±äµÄ,µ«ÊÇ»¹ÊÇÄܱäµÄÐÅÏ¢·ÅÔÚ»º´æÖÐÒÔ¼Ó¿ìÏÔʾËÙ¶È,ÕâÊǺÜÓмÛÖµµÄ,ËùνµÄ»º´æ,ͨË×µÄÀí½â¾ÍÊÇһЩ±£´æÔÚ·þÎñÆ÷¶ËµÄ¹²ÓÃЊϢ.ËüÊÇÓÚ·þÎñÆ÷ͬÉúËÀµÄ,ÎÒÃÇÔÚ±£´æ»º´æµÄʱºò¿ÉÒÔÖ¸¶¨Ï´θüеÄʱ¼äµÄÅжÏ,±È·½ÒªÔÚ5·ÖÖÓ¸üÐÂÒ»´Î,¿ÉÒԼǼÉϴθüеÄʱ¼ ......
PHP»·¾³ÅäÖÃÐĵÃ
ApacheµÄÅäÖÃ
Ê×ÏÈÎÒÔÚhttp://httpd.apache.org/download.cgiϵÄÊÇ“Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.15-win32-x86-no_ssl.msi”¡£°²×°ÄÇÊÇС¶ù¿ÆÀ²£¬ÏÂÒ»²½ÏÂÒ»²½¡£ÎҾͲ»ËµÁË¡£
°²×°Íêºó¾ÍÒª¿ªÊ¼ÅäÖÃÁË£¬ ......
×î½üµÄÏîÄ¿ÖÐʹÓõ½¼Æ»®ÈÎÎñ£¬Í¨¹ýbatÖ´ÐÐphpÎļþ£¬È»¶ø·¢ÏÖphpÎļþÔÚä¯ÀÀÆ÷ÖпÉÒÔÖ´Ðеĺܺ㬶øbatµ÷ÓÃȴʼÖÕûÓз´Ó¦
autosave.batÖÐÄÚÈÝÈçÏÂ
D:\software\php\php.exe -q D:\web\works\mymedia\autosave.php
ÆäÖÐautosave.phpÎļþÖаüº¬ÆäËûµÄÀàʹÓÃÏà¶Ô·¾¶
Ö±½ÓÔÚautosave.phpÀïÃæÊä³öecho 1;
¿ÉÒÔÔÚcommondÃüÁî ......
´úÂ룺
<?php
$im = imagecreatefromjpeg("ok.jpg");
$black = @imagecolorallocate($im, 0,0,0);
$jpgnumid = "ÕâÊÇǶÈ뵽ͼƬµÄÎÄ×Ö£¬½â¾öÁËÂÒÂëÎÊÌâ,
ÉÏÃæµÄok.jpgÊÇͬĿ¼ÏµÄÕÕƬ.ʹÓÃËüʱ£¬»¹ÐèÒªÓÐiconv
Ä£¿é£¡Ò²¾ÍÊÇ˵ÔÚphp.iniÀォ
[iconv]
iconv.input_encoding = ISO-8859-1
iconv.internal_encodin ......