php——Êý¾ÝÀàÐÍ£¨Ò»£©
ÔÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/03/1-10/
ÓëÆäËû±à³ÌÓïÑÔ²»Í¬µÄÊÇ£ºPHPµÄÊý¾ÝÀàÐͲ»ÊÇÓɳÌÐòÔ±ÔÚ¶¨Òå±äÁ¿µÄʱºò¾ö¶¨µÄ£¬¶øÊÇÓÉPHPÔÚ³ÌÐòÔËÐйý³ÌÖж¨Òå¡£
PHP¹²Ö§³Ö8ÖÖÊý¾ÝÀàÐÍ£ºÕûÐÍ£¨integer£©¡¢¸¡µãÐÍ£¨float£©¡¢×Ö·û´®ÐÍ£¨string£©ºÍ²¼¶ûÐÍ£¨Boolean£©ËÄÖÖ±êÁ¿ÀàÐÍ£¬Êý×飨array£©ºÍ¶ÔÏó£¨object£©Á½ÖֺϳÉÀàÐÍ£¬¿ÕÖµ£¨null£©ºÍ×ÊÔ´£¨resource£©Á½ÖÖÌØÊâÀàÐÍ¡£
ÕûÐÍ£¨integer£©
רÃÅÓÃÀ´±íʾÕûÊý£¬¿ÉÓÃÊ®½øÖÆ¡¢°Ë½øÖƺÍÊ®Áù½øÖƱíʾ¡£
Ê®½øÖƾÍÊÇÈÕ³£Ê¹ÓõÄÊý×Ö£»°Ë½øÖÆ£¬Êý×ÖÇ°±ØÐë¼ÓÉÏ‘0’£»Ê®Áù½øÖÆ£¬Êý×ÖÇ°±ØÐë¼Ó‘0x’¡£
ÁÐ×Ó£º
¡¡<?php
¡¡¡¡$php = 100; //Ò»¸öÊ®½øÖÆÕûÊý
¡¡¡¡$php = -100; //Ò»¸öÊ®½øÖƸºÊý
¡¡¡¡$php = 0666; //Ò»¸ö°Ë½øÖÆÕûÊý
¡¡¡¡$php = 0×64; //Ò»¸öÊ®Áù½øÖÆÕûÊý
¡¡?>
×¢Ò⣺ÓëÆäËûÓïÑÔ²»Í¬µÄÊÇ£¬PHP²»Ö§³ÖÎÞ·ûºÅÊý¡£
¸¡µãÐÍ£¨float£©
ÓÃÀ´±íʾ´øÓÐСÊýµãµÄÊýµÄÒ»ÖÖÀàÐÍ¡£
¸¡µãÊýµÄ±íʾ·½·¨£º
ÓÃÆÕͨµÄ´øÓÐСÊýµãµÄÊýÀ´±íʾ£¨È磬1.2£©£»
ÓÿÆѧ¼ÆÊý·¨±íʾ£¨È磬1.0E3;2.1e-6£©,×¢ÒâÐèÒªÓÃE»òÕße±íʾָÊýÃÝ¡£
Àý×Ó£º
<?php
¡¡¡¡$php = 1.261; //ÆÕͨµÄ´øÓÐСÊýµãµÄÊý
¡¡¡¡$php = 1.0E3; //¿Æѧ¼ÆÊý·¨±íʾ,E
¡¡¡¡$php = 7e-6; //ÁíÒ»ÖÖ¿Æѧ¼ÆÊý·¨±íʾ
¡¡?>
×¢Ò⣺ÓÉÔÚÁ½ÖÖÇé¿öÏÂPHP»á½«Ö¸¶¨µÄÕûÊý½âÊÍΪ¸¡µãÊý£º
Ö¸¶¨µÄÊý³¬¹ýÁËÕûÐ͵ķ¶Î§£¬Ò²¾ÍÊdz¬¹ýÁË14λÊý×ֵľ«¶È£¬·¢ÉúÒç³öʱ£»
¶¨µÄÊýÔÚСÊýµãµÄÓÒ²àÓÐÈκÎÊý½«±»ÊÓΪ¸¡µãÊý¡£
×Ö·û´®ÐÍ£¨string£©
ÓÃÀ´±íʾһ¸ö×Ö·û´®£¨Ò»Á¬´®µÄ×Ö·û¹¹³ÉµÄÒ»¸ö¼¯ºÏ£©¡£
×Ö·û´®ÐÍ¿ÉÒÔÓÃÈýÖÖ·½·¨¶¨Ò壺µ¥ÒýºÅÐÎʽ¡¢Ë«ÒýºÅÐÎʽºÍ±êʶ·ûÐÎʽ¡£
µ¥ÒýºÅÐÎʽ
ÀýÈ磺
¡¡<?php
¡¡¡¡$php = 100;
¡¡¡¡echo ‘This is phpdo.net.<br>’;
¡¡¡¡echo ‘What\’s php<br>’;
¡¡¡¡echo ‘The file is stored in E:\\<br>’;
¡¡¡¡echo ‘The variable is $php<br>’;
¡¡?>
½á¹û£º
¡¡¡¡This is phpdo.net.
¡¡¡¡What’s php
¡¡¡¡The file is stored in E:\
¡
Ïà¹ØÎĵµ£º
º¯Êý
´´½¨ PHP º¯Êý
º¯ÊýÊÇÒ»ÖÖ¿ÉÒÔÔÚÈκα»ÐèÒªµÄʱºòÖ´ÐеĴúÂë¿é¡£
´´½¨ PHP º¯Êý£º
1 ËùÓеĺ¯Êý¶¼Ê¹Óùؼü´Ê "function()" À´¿ªÊ¼
2 ÃüÃûº¯Êý - º¯ÊýµÄÃû³ÆÓ¦¸ÃÌáʾ³öËüµÄ¹¦ÄÜ¡£º¯ÊýÃû³ÆÒÔ×Öĸ»òÏ»®Ïß¿ªÍ·¡£
......
1 ÉùÃ÷Ò»¸öÀà
class ÈË{
³ÉÔ±ÊôÐÔ£ºÐÕÃû¡¢ÐÔ±ð¡¢ÄêÁä¡¢Éí¸ß¡¢ÌåÖØ¡¢µç»°¡¢¼Òͥסַ
³ÉÔ±·½·¨£º¿ÉÒÔ¿ª³µ£¬ »á˵ӢÓ ¿ÉÒÔʹÓõçÄÔ
}
ÊôÐÔ£º
ͨ¹ýÔÚÀඨÒåÖÐʹÓùؼü×Ö“var”À´ÉùÃ÷±äÁ¿£¬¼´´´½¨ÁËÀàµÄÊôÐÔ,ËäÈ»ÔÚÉùÃ÷³ÉÔ±ÊôÐÔµÄʱºò¿ÉÒÔ¸ø¶¨³õʼֵ£¬ µ«ÊÇÔÚÉùÃ÷ÀàµÄʱºò¸ø³ÉÔ±ÊôÐÔ³õʼֵÊÇûÓбØÒªµÄ£¬±ÈÈ ......
8 ·ÃÎÊÀàÐÍ
ÀàÐ͵ķÃÎÊÐÞÊηûÔÊÐí¿ª·¢ÈËÔ±¶ÔÀà³ÉÔ±µÄ·ÃÎʽøÐÐÏÞÖÆ£¬ÕâÊÇPHP5 µÄÐÂÌØÐÔ£¬µ«È´ÊÇOOPÓïÑÔµÄÒ»¸öºÃµÄÌØÐÔ¡£¶øÇÒ´ó¶àÊýOOP ÓïÑÔ¶¼ÒÑÖ§³Ö´ËÌØÐÔ¡£PHP5 Ö§³ÖÈçÏÂ3 ÖÖ·ÃÎÊÐÞÊηû£º
public(¹«Óеġ¢Ä¬ÈϵÄ)£¬private(˽ÓеÄ)ºÍprotected(Êܱ£»¤µÄ)ÈýÖÖ¡£
public ¹«ÓÐÐÞÊηû£¬ÀàÖеijÉÔ±½«Ã»ÓзÃÎÊÏÞÖÆ£¬ËùÓеÄÍⲿ ......
Ê×ÏÈ×¢Òâ°æ±¾ÎÊÌ⣬һ¶¨Òª×Ðϸ²é¿´php manualÉϵÄÄÚÈÝ£¬Èçhttp://www.php.net/manual/en/install.windows.apache2.php ÉÏÓÐÒ»¸önote:
Note
:
Apache 2.2 Support
Users of Apache 2.2 should note that the DLL file for Apache 2.2 is
named php5apache2_2.dll
rather than php5apache2.d ......
Ê×ÏÈ×¢Òâ°æ±¾ÎÊÌ⣬һ¶¨Òª×Ðϸ²é¿´php manualÉϵÄÄÚÈÝ£¬Èçhttp://www.php.net/manual/en/install.windows.apache2.php ÉÏÓÐÒ»¸önote:
Note
:
Apache 2.2 Support
Users of Apache 2.2 should note that the DLL file for Apache 2.2 is
named php5apache2_2.dll
rather than php5apache2.d ......