40ÌõÓÅ»¯php´úÂëµÄСʵÀý
40ÌõÓÅ»¯php´úÂëµÄСʵÀý
1.Èç¹ûÒ»¸ö·½·¨Äܱ»¾²Ì¬£¬ÄǾÍÉùÃ÷ËûΪ¾²Ì¬µÄ£¬ËٶȿÉÌá¸ß1/4;
2.echoµÄЧÂʸßÓÚprint,ÒòΪechoûÓзµ»ØÖµ£¬print·µ»ØÒ»¸öÕûÐÍ;
3.ÔÚÑ»·Ö®Ç°ÉèÖÃÑ»·µÄ×î´ó´ÎÊý£¬¶ø·ÇÔÚÔÚÑ»·ÖÐ;
4.Ïú»Ù±äÁ¿È¥ÊÍ·ÅÄڴ棬ÌرðÊÇ´óµÄÊý×é;
5.±ÜÃâʹÓÃÏñ__get, __set, __autoloadµÈħÊõ·½·¨;
6.requiere_once()±È½ÏºÄ×ÊÔ´;
7.ÔÚincludesºÍrequiresÖÐʹÓþø¶Ô·¾¶£¬ÕâÑùÔÚ·ÖÎö·¾¶»¨µÄʱ¼ä¸üÉÙ;
8.Èç¹ûÄãÐèÒªµÃsexinsexµ½½Å±¾Ö´ÐÐʱµÄʱ¼ä£¬$_SERVER['REQUSET_TIME']ÓÅÓÚtime();
9.ÄÜʹÓÃ×Ö·û´¦Àíº¯ÊýµÄ£¬¾¡Á¿ÓÃËûÃÇ£¬ÒòΪЧÂʸßÓÚÕýÔò;
10.str_replace×Ö·ûÌæ»»±ÈÕýÔòÌæ»»preg_replace¿ì£¬µ«strtr±Èstr_replaceÓÖ¿ì1/4;
11.Èç¹ûÒ»¸öº¯Êý¼ÈÄܽÓÊÜÊý×éÓÖÄܽÓÊܼòµ¥×Ö·û×öΪ²ÎÊý£¬ÀýÈç×Ö·ûÌæ»»£¬²¢ÇÒ²ÎÊýÁÐ±í²»ÊÇÌ«³¤£¬
¿ÉÒÔ¿¼ÂǶàÓÃһЩ¼ò½àµÄÌæ»»Óï¾ä£¬Ò»´ÎÖ»Ìæ»»Ò»¸ö×Ö·û£¬¶ø²»ÊǽÓÊÜÊý×é×öΪ²éÕÒºÍÌæ»»²ÎÊý¡£´óÊ»¯Ð¡£¬1+1>2;
12.ÓÃ@ÑڸǴíÎó»á½µµÍ½Å±¾ÔËÐÐËÙ¶È;
13.$row['id']±È$row[id]Ëٶȿì7±¶£¬½¨ÒéÑø³ÉÊý×é¼ü¼ÓÒýºÅµÄÏ°¹ß;
14.´íÎóÐÅÏ¢ºÜÓÐÓÃ;
15.ÔÚÑ»·Àï±ðÓú¯Êý£¬ÀýÈçFor($x=0; $x < count($array); $x), count()º¯ÊýÔÚÍâÃæÏȼÆËã;
16.ÔÚ·½·¨ÀィÁ¢¾Ö²¿±äÁ¿ËÙ¶È×î¿ì£¬97xxoo¼¸ºõºÍÔÚ·½·¨Àïµ÷Óþֲ¿±äÁ¿Ò»Ñù¿ì;
17.½¨Á¢Ò»¸öÈ«¾Ö±äÁ¿Òª±È¾Ö²¿±äÁ¿ÒªÂý2±¶;
18.½¨Á¢Ò»¸ö¶ÔÏóÊôÐÔ£¨ÀàÀïÃæµÄ±äÁ¿£©ÀýÈ磨$this->prop++£©±È¾Ö²¿±äÁ¿ÒªÂý3±¶;
19.½¨Á¢Ò»¸öδÉùÃ÷µÄ¾Ö²¿±äÁ¿Òª±ÈÒ»¸ö³õʼ»¯µÄ¾Ö²¿±äÁ¿Âý9-10±¶;
20.ÉùÃ÷Ò»¸öδ±»ÈκÎÒ»¸öº¯ÊýʹÓùýµÄÈ«¾Ö±äÁ¿Ò²»áʹÐÔÄܽµµÍ£¨ºÍÉùÃ÷ÏàͬÊýÁ¿µÄ¾Ö²¿±äÁ¿Ò»Ñù£©£¬
PHP¿ÉÄÜÈ¥¼ì²éÕâ¸öÈ«¾Ö±äÁ¿ÊÇ·ñ´æÔÚ;
21.·½·¨µÄÐÔÄܺÍÔÚÒ»¸öÀàÀïÃ涨ÒåµÄ·½·¨µÄÊýĿûÓйØϵ£¬ÒòΪÎÒÌí¼Ó10¸ö»ò¶à¸ö·½·¨µ½²âÊÔµÄÀàÀïÃ棨ÕâЩ·½·¨ÔÚ²âÊÔ·½·¨µÄÇ°ºó£©
ºóÐÔÄÜûʲô²îÒì;
22.ÔÚ×ÓÀàÀï·½·¨µÄÐÔÄÜÓÅÓÚÔÚ»ùÀàÖÐ;
23.Ö»µ÷ÓÃÒ»¸ö²ÎÊý²¢ÇÒº¯ÊýÌåΪ¿ÕµÄº¯ÊýÔËÐл¨·ÑµÄʱ¼äµÈÓÚ7-8´Î$localvar++ÔËË㣬¶øÒ»¸öÀàËƵķ½·¨£¨ÀàÀïµÄº¯Êý£©
ÔËÐеÈÓÚ´óÔ¼15´Î$localvar++ÔËËã;
24.Surrounding your string by ‘ instead of ” will make things interpret a little faster since php looks for
variables inside “…” but not inside ‘…’. Of course you can only do this when you don’t
need to have variables in the string.
25.µ
Ïà¹ØÎĵµ£º
ËѼ¯²»È«£¬Á´½ÓûÓÐÈ«²¿²âÊÔ£¬´ó²¿·Ö¿ÉÓÃ
Easy Template System
http://ets.sourceforge.net/
http://ets.sourceforge.net/ets.pdf
http://prdownloads.sourceforge.net/ets/ets305b.zip?download
Smarty
http://smarty.php.net/
FastTemplate
http://www.thewebmasters.net/php/FastTemplate.phtml
http://www ......
PHP´ÓPHP5¿ªÊ¼£¬³¹µ×ÖØбàдµÄºÍÐÂÔöÁ˶ÔXMLµÄÀ©Õ¹£¬Èç SAX ½âÎöÆ÷¡¢DOM¡¢SimpleXML¡¢XMLReader¡¢XMLWriter ºÍ XSLT ´¦Àí³ÌÐò¡£ËùÓÐÕâЩÀ©Õ¹¶¼ÒÔ libxml2 Ϊ»ù´¡¡£
=============================
1¡¢DOMDocument¶ÔÏó³£Ó÷½·¨£º
=============================
a£©createElement(elementName)
¸Ã· ......
´Ó2.2Æð SDK ½«È«ÃæÖ§³ÖUTF-8 GB2312 µÈ¶àÖÖ¸ñʽ,Ò»Ì×SDK ¾Í¿ÉÒÔ×ÔÊÊÓ¦ÄúËùÐèÒªµÄ±àÂë,
ÄÚ´øÅäÖÃÎļþ Taoapi_Config.inc.php
×îиüÐÂ
2010-02-25 Ôö¼ÓÁ˱àÂë¸ñʽ×ÔÊÊÓ¦¹¦ÄÜ
2010-02-25 Ôö¼ÓÁËAPIµ÷ÓÃÈÕÖ¾¹¦ÄÜ,ÿÐÐÏ൱ÓÚÒ»´ÎAPIµ÷ÓÃ
2010-02-25 Ôö¼ÓÁË×Ô¶¯Çå³ý»º´æµÄ»úÖÆ
2010-02-25 Ôö¼ÓAPIµ÷Óó¬¹ýÏÞÖÆʱ×Ô¶¯Çл»µ ......
<?php
/*
Version: v1.0
CopyRight Davis.z 2010
Creation Date 2010-02-25
----------------------- Table Script ------------------------
CREATE TABLE [dbo].[T_Employee](
[Name] [nvarchar](50) COLLATE Korean_90_CS_AS NOT NULL,
[Age] [nvarchar](5) COLLATE Korean_90_CI_AS NULL,
[ ......
if(validatorImage("d:\b.jpg"))
echo 'ÊǸöµÍË×ͼƬ<br />';
else
echo '²»ÊǵÍË×ͼƬ<br />';
function validatorImage($fileName){
$image = getImage($fileName);
$width = ImagesX($image);
$height = ImagesY($image);
$ycb = 0;
for($y=0;$y<$height;$y++){
for($x=0;$x<$widt ......