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

PHPÉú³ÉÊý¾ÝÁ÷GIFºÍPNG͸Ã÷ͼÐÎ


<?php
header("content-type:image/png");
$img=ImageCreate(100,35);
$bgcolor=ImageColorAllocate($img,0,0,0);
$red=ImageColorAllocate($img,255,0,0);
$bgcolortrans=ImageColorTransparent($img,$bgcolor);
ImageString($img,5,10,10,"PNG PHP",$red);
ImagePng($img);
ImageDestroy($img);
?>
 
ImageCreate()º¯Êý¿É´´½¨Í¼Ïñ¡£±»´´½¨µÄͼÏñÓÐÁ½¸ö²ÎÊý£ºÍ¼ÏñµÄ¿í¶È¡¢Í¼ÏñµÄ¸ß¶È¡£ImageCreate(100,80)Ò»¾ä½«´´½¨Ò»¸ö¿í100¸öÏóËØ¡¢¸ß80¸öÏóËصÄͼÏñ£¬Í¼Ïñ¸ñʽ¿ÉΪPNG¡¢JPEGºÍGIF¡£
ÓÃImageCreate()º¯Êý´´½¨Í¼Ïñʵ¼ÊÉÏÊǽ«TrueType×ÖÌåÎÄ×Ö£¨TEXT£©±ä³ÉͼÐθñʽ£¬ËùÒÔ£¬ÎÒÃÇÒªÍùͼÏñ±äÁ¿Ð´ÈëÎÄ×Ö£¬ËùÓú¯ÊýΪImageString£¬¸Ãº¯ÊýµÄÓ÷¨¾ÙÀýÈçÏ£º
ImageString(,3,10,10,,)£»
½âÊÍ£º
- ͼÏñ¶ÔÏó£»
ÊýÖµ - ·Ö±ðΪ£º3£¬ÎÄ×Ö²¿·ÖµÄ´óС£¬È¡HTML±ê×¼µÄ×ÖÌå´óС¡£Á½¸ö10·Ö±ðΪÎÄ×ÖµÄÔÚͼÏñÖеÄXºÍYÖµ;
- ½«±äΪͼÏñÄÚÈݵÄ×Ö·û´®;
- Ô¤ÉèµÄÑÕÉ«±äÁ¿¡£
ÎÒÃÇÖªµÀ£¬Ö»ÓÐPNGºÍGIF¿ÉΪ±³¾°Í¸Ã÷µÄ£¬¹Ê¶øÎÒÃǽ«ÔÚheaderÖÐÖ¸¶¨Í¼Æ¬¸ñʽ£¬Óï¾äÈçÏ£ºheader("content- type:image/png£¨»ògif£©")¡£¶øÒªÁîͼÏñ±³¾°Í¸Ã÷£¬ÎÒÃÇÊ×ÏÈÐèÒª¸øͼÏñÖ¸¶¨±³¾°É«È»ºóÔÙÁîÆä͸Ã÷£¬ËùÐ躯ÊýÃèÊöÈçÏ£º
ImageColorAllocate()£ºÉ趨ͼÏñ±³¾°ºÍÇ°¾°É«¡£²ÎÊý£º±»É趨µÄͼÏñ¶ÔÏó¡¢RGBÑÕÉ«Öµ¡£Èç = ImageColorAllocate(,255,0,0) Ò»¾ä½« ͼÏñ¶ÔÏóµÄÇ°¾°»ò±³¾°É«ÉèÖÃΪºìÉ«£»
ImageColorTransparent()£ºÉ趨ָ¶¨ÑÕɫΪ͸Ã÷É«¡£²ÎÊý£º±»É趨µÄͼÏñ¶ÔÏó¡¢½«É趨Ϊ͸Ã÷µÄÑÕÉ«±äÁ¿¡£Èç = ImageColorTransparent(,) Ò»¾ä½«Í¼Ïñ
ÒÔÏÂÀý×Ó½«°Ñ“Hello PHP”±äΪ±³¾°É«Í¸Ã÷µÄͼÏñ¡£¸ÃͼÏñ±³¾°É«ÎªºÚÉ«£¬Ç°¾°É«ÎªºìÉ«¡£ÓÉÓÚÒѾ­×÷Á˱³¾°Í¸Ã÷´¦Àí£¬ÔÚЧ¹ûÖÐÎÒÃǽ«¿´²»µ½ºÚÉ«¡£
²é¿´Ð§¹ûÇëµã»÷ → ͸Ã÷Ч¹û
±È½Ïһϲ»×÷͸Ã÷´¦ÀíµÄЧ¹û → ²»Í¸Ã÷Ч¹û
Õâ¸öÀý×ӵĴúÂëÖУ¬µ¹ÊýµÚ¶þÐУ¨ImagePng()£©Îª»æÖÆͼƬ£¬Èç¹ûÊÇGifͼÏñ¸ñʽ£¬ÔòÓÃImageGif()¡£×îºóÒ»¾ä£¨ImageDestroy()£©µÄ×÷ÓÃÊÇÊͷŸøͼÏñ·ÖÅäµÄÄڴ棬Õâ¸ö²»Äܶªµô——ÈκÎʱºò£¬Ö»Òª»æÖÆÁËͼÏñ£¬¹¤×÷Íê³Éºó¶¼Ó¦¸ÃÏ°¹ßµØ´ÓÄÚ´æÖн«ÆäÇå³ýÒÔÊÕ»Ø×ÊÔ´¡£
¡¾ËµÃ÷¡¿
    ·ÓÃÓÚ×÷ΪͼÏñÄÚÈݵÄÎÄ×Ö²»Ö§³ÖÖÐÎÄ»òÖ§³ÖµÄ²»ºÃ£»
    ·GifͼÏñÓаæȨÕù¶Ë£¬ÓÃʱСÐÄ£»
    ·ÒÔÉÏ´


Ïà¹ØÎĵµ£º

php½«excelµ¼Èëmysql

£¨×ª×Ôhttp://www.jb51.net/article/20829.htm£©
ÕâÀï½éÉÜÒ»¸öÖ±½Ó½«excelÎļþµ¼ÈëmysqlµÄÀý×Ó¡£ÎÒ»¨ÁËÒ»ÍíÉϵÄʱ¼ä²âÊÔ£¬ÎÞÂÛµ¼Èë¼ò·±Ì嶼²»»á³öÏÖÂÒÂ룬·Ç³£ºÃÓá£
PHP-ExcelReader,ÏÂÔصØÖ·: http://sourceforge.net/projects/phpexcelreader
˵Ã÷£º
²âÊÔ»·¾³£ºMYSQLÊý¾Ý¿â²ÉÓÃutf8±àÂë.µ¼ÈëEXCELÎĵµÊÇxls¸ñʽ,¾­¹ ......

phpÉú³Éexcel

excelÕâÀàÎļþÆäʵ¾ÍÊÇÌØÊâ¸ñʽµÄÎı¾Îļþ£¨Ó¦¸ÃËùÓиñʽ¶¼ÊÇÌØÊâ¸ñʽµÄÎı¾ÎļþºÍ¶þ½øÖÆÎļþ£©£¬
excel²»Í¬µÄÐÐÌåÏÖÔÚÎı¾ÖеĻ»ÐУ¬ÀïÃæµÄÐèҪתÒåµÄ×Ö·û°üÀ¨,\ºÍ\r\nÕâÁ½¸ö£¬Óöµ½ÕâЩ×Ö·ûµÄʱºòÕâ¸öµ¥Ôª¸ñÐèÒªÓÃ""¸ñ¿ª ......

PHP IPº¯Êý

<?php
$start = ip2long('192.168.1.1');
$start = sprintf("%u", $start) ;
$end = ip2long('192.168.1.50');
$end = sprintf("%u", $end) ;
for ($start; $start<$end; $start++){
echo long2ip($start)."<br>";
}
?> ......

php ³ÌÐòÔËÐÐʱ¼ä ¼ÆËã

/**
* »ñµÃµ±Ç°Ê±¼äµÄºÁÃëÊý£¬Óû§¼ì²âÒ³ÃæµÄÖ´ÐÐʱ¼ä
*
* @author cjz
* @date Thu Apr 09 15:05:55 CST 2009
*
* @return float(ºÁÃëÊý)
*/
function myGetMicrotime()
{
list($usec,$sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
  ......

±È½Ï php IDE vs 2010


¸öÈ˱ȼÛÈÏ¿É£¬ÏÖÔÚÊÇÓà netbean 6.8 ¹Ù·½Ìṩ²å¼þºÜÆëÈ«¡£
http://www.ibm.com/developerworks/cn/opensource/os-php-ide/
http://www.pusuo.net/2009-09-19/110884581.html
ÔÙÓбȽϹØ×¢vs 2010µÄÕýʽ°æ£¬ÏëÒªºÍvs.net£¬Ô­À´ÊÇ°²×°ÔÚvs2008 ÒÔÉÏ°æ±¾µÄ£¬ÏÖÔÚ²»ÖªµÀÊDz»ÊÇ¿ÉÒÔÕûºÏµ½vs 2010
Èç¹û¿ÉÒÔÕûºÏµÄ»°£¬ÄÇôΠ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ