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

php stdClass


ÎÊÌ⣺
ÄãÏë´´½¨Ò»¸ö¶ÔÏ󣬲¢ÔÚÆäÖÐÌí¼ÓһЩÊôÐÔ£¬µ«ÊÇÄãÈ´²»Ïë°ÑËü×÷Ϊһ¸öÃ÷È·µÄÀàÕýʽµØ¶¨ÒåËü¡£ÕâÒ»µãÔÚһЩÇé¿öÏÂÊÇÏ൱ÓÐÓõģ¬ÀýÈçµ±ÄãÐèÒª¶¨ÒåÒ»¸ö·½·¨À´·µ»Ø´øÓÐijЩÊôÐÔ£¨²»È·¶¨µÄ£©µÄ¶ÔÏóʱ£¬¾ÍÈçͬ´Ómysql_fetch_object( ) »òÕß imap_header( )µÄʹÓÃÒ»Ñù¡£
һάÊý×é,ÎÒÏÖÔÚÌرðϲ»¶°ÑËüд³É¶ÔÏó,ÒòΪ¼üÅÌ´òÆðÀ´±È½Ï˳ÊÖ,¿´ÆðÀ´Ò²Ë³ÑÛ,Èç
$andy = array();
$andy['a'] = 1;
$andy['b'] = 2;
$andy['c'] = 3;
ÎÒϲ»¶°ÑËü±ä³ÉÕâÑù
$andy = array();
$andy = (object)$andy;
$andy->a = 1;
$andy->b = 2;
$andy->c = 3;
н¨¿ÕÊý×éÖ»Òª$andy = array();
н¨¿Õ¶ÔÏñÈ´Òª$andy = new Andy; ¶øÇÒ»¹µÃÏÈÓиöclass Andy{}
»òÕßµÃ2ÐÐ
$andy = array();
$andy = (object)$andy;
ÓÃarrayÖ±½Ó¸ÄÀàÐͳÉobjectÓеã±ðŤ,½ñÌìÕÒµ½ÁË´ð°¸,¸ÐлphpxµÄÐÖµÜ
====================================================================
˳±ãתһÏÂstdClassµÄ½éÉÜ
$user = new stdClass();
$user->name = 'gouki';
ÕâÑùµÄ´úÂ룬ÕâÊǸÉÂïÓõÄÄØ£¿
·­¿ªÊֲᣬËÑË÷stdClass£¬Äã»á·¢ÏÖ£¬ÊÖ²áÉϼ¸ºõûÓнéÉÜ£¬Èç¹ûÄãÔÙ´ÎËÑË÷google£¬¿´µ½µÄÒ²¼¸ºõÈ«ÊÇÓ¢ÎĽâÊÍ¡£
Æäʵ£¬stdClassÔÚPHP5²Å¿ªÊ¼±»Á÷ÐС£¶østdClassÒ²ÊÇzendµÄÒ»¸ö±£ÁôÀà¡£ËƺõûÓÐÆäËû×÷Óá£Ò²¼¸ºõûÓÐÈκÎ˵Ã÷¡£
»òÕߣ¬ÎÒÃÇ¿ÉÒÔÕâôÀí½â£ºstdClassÊÇPHPµÄÒ»¸ö»ùÀ࣬ËùÓеÄÀ༸ºõ¶¼¼Ì³ÐÕâ¸öÀ࣬ËùÒÔÈκÎʱºò¶¼¿ÉÒÔ±»new£¬¿ÉÒÔÈÃÕâ¸ö±äÁ¿³ÉΪһ¸öobject¡£Í¬Ê±£¬Õâ¸ö»ùÀàÓÖÓÐÒ»¸öÌØÊâµÄµØ·½£¬¾ÍÊÇûÓз½·¨¡£
·²Ê±ÓÃnew stdClass()µÄ±äÁ¿£¬¶¼²»¿ÉÄÜ»á³öÏÖ$a->test()ÕâÖÖ·½Ê½µÄʹÓá£
»òÕߣ¬ÎÒÃÇ¿ÉÒÔÓÖÕâôÀí½âһϣ¬ÕýÒòΪPHP5µÄ¶ÔÏóµÄ¶ÀÌØÐÔ£¬¶ÔÏóÔÚÈκεط½±»µ÷Ó㬶¼ÊÇÒýÓõØÖ·Ð͵ģ¬ËùÒÔÏà¶ÔÏûºÄµÄ×ÊÔ´»áÉÙÒ»µã¡£ÔÚÆäËüÒ³ÃæΪËü¸³ÖµÊ±ÊÇÖ±½ÓÐ޸ģ¬¶ø²»ÊÇÒýÓÃÒ»¸ö¿½±´¡£
ÀýÈ磺
$user = new stdClass();
$user->name = 'gouki';
$myUser = $user;
$myUser->name = 'flypig';
Èç¹ûÔÚPHP4ʱ´ú£¬ÕâÑùµÄ´úÂë¾ÍÊÇÔÚÏûºÄϵͳ×ÊÔ´¡£ÒòΪ£º
$myUser = $user;
ÕâÊÇ´´½¨ÁËÒ»¸ö¿½±´¡£ËùÒÔ£¬ÔÚPHP4µÄʱºò£¬¶¼ÊÇÕâÑùʹÓãº
$myUser = & $user;
ÓÐÈË˵£¬ÎªÊ²Ã´²»ÓÃÊý×éÄØ£¿Êý×é²»ÊǸü·½±ãÂ𣿶øÇÒ¶ÔÓÚPHPÕâÑùµÄÈõÀàÐͳÌÐòÀ´Ëµ£¬ÓÃÊý×éÓ¦¸ÃÊÇ×î·½±ãµÄ¡£
ȷʵ¡£Êý×éÔÚ³ÌÐòµÄʹÓÃÖÐÓ¦¸ÃÊÇ×î·½±ãµÄ£¬È»¶øÊý×éµÄÿ´Î±»ÒýÓã¨$a = $b£©£¬Æäʵ¶¼ÊÇ´´½¨ÁËÒ»¸ö¸±±


Ïà¹ØÎĵµ£º

PhpÊý×é

 
1,¶¨Î»Êý×飺
bool in_array ( mixed needle,array haystack[,bool strict]) ²éÕÒÖ¸¶¨ÔªËØ£»
array array_keys (arraqy input [, mixed search_value]) ·µ»Ø¼üÖµ×é³ÉµÄÊý×飻
bool array_key_exists(mixed key,array search) ÅжϼüÖµÊÇ·ñΪָ¶¨µÄ¼üÖµ£»
array array_values (array input) ·µ»ØÊý×éÖеÄÔªËØÖµ£ ......

phpÖУ¬¹ØÓÚÕû³ýµÄ3¸öº¯Êý2008

phpÖУ¬¹ØÓÚÕû³ýµÄ3¸öº¯Êý
2008-10-23 23:25
Ceil: ¼ÆËã´óÓÚÖ¸¶¨ÊýµÄ×îСÕûÊý¡£
Floor: ¼ÆËãСÓÚÖ¸¶¨ÊýµÄ×î´óÕûÊý¡£
round: ËÄÉáÎåÈë¡£
¸ù¾ÝÐèҪѡÓÃ
<?php
$a=20;
$b = 6;
echo ($a/$b)."<br>"; //out 3.3333333333333
echo ceil($a/$b)."<br>"; //out 4
echo floor($a/$b)."<br> ......

phpÀ©Õ¹°²×°soapÄ£¿é





Ê×ÏÈ°²×°Íêphp
ºó×îºÃ±£Áôµ±Ê±°²×°µÄÎļþ£¬±ÈÈçÎҵķ¾¶/export1/soft
#cd php-5.2.8/ext/soap
#/usr/local/php/bin/phpize
#./configure --with-php-config=/usr/local/php/bin/php-config
--enable-soap
#make
#make install

±àÒëºóµÄsoap.so
Îļþ± ......

PHP´ýÓö

2200µÄ·¹ý¡£¡£PHP±¾ÉíÊǼòµ¥£¬µ«Ñ§PHP²»ÊÇÖ¸Äã×ßPHPÕâÌõ·£¬¶øÊÇÖ¸Äã×ßWEBÕâÌõ·£¬»áPHP£¬»¹Òª»áECSHOP,DZ,PHPCMS,µÛ¹úCMS¸÷´ó³ÌÐò£¬Äã»áÁËô£¿ºÃ£¬Äã˵ÄãPHPºÜºÃ£¬ÕâЩÎÒ¶¼»á£¬ÄÇAJAX?¿ÉÒÔÁé»îÔËÓã¿AJAXÒ²»á£¬ÄǺã¬FLEXÄã»áÁËô£¿¶¼»á£¬ºÃ£¬Äã¿ÉÒÔ×ÔÐÐÔÚWIN2003»òÕßLINUXÏÂÅäÖÃPHP»·¾³£¬»ñÈ¡×îÓÅ»·¾³ÁËô£¿ÈôÏë¸ß¹¤×Ê£¬ ......

PHPͼƬ´¦ÀíÀà


<?php
/*
ͼƬ´¦Àíº¯Êý¹¦ÄÜ£ºËõ·Å¡¢¼ôÇС¢Ïà¿ò¡¢Ë®Ó¡¡¢Èñ»¯¡¢Ðýת¡¢·­×ª¡¢Í¸Ã÷¶È¡¢·´É«
´¦Àí²¢±£´æÀúÊ·¼Ç¼µÄ˼·£ºµ±ÓÐͼƬÓиĶ¯Ê±×Ô¶¯Éú³ÉÒ»ÕÅÐÂͼƬ£¬ÃüÃû·½Ê½¿ÉÒÔ¿¼ÂÇÔÚԭͼƬµÄ»ù´¡ÉϼÓÉϲ½Ö裬ÀýÈ磺ͼƬÃû³Æ+__µÚ¼¸²½
*/
class picture{
var $PICTURE_URL;//Òª´¦ÀíµÄͼƬ
var $DEST_URL="temp__01.jpg" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ