ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

4-3-1 ¨ç¼Æªº°Ñ¼Æ¶Ç»¼

4-3-1 ¨ç¼Æªº°Ñ¼Æ¶Ç»¼

4-3-1   ¨ç¼Æªº°Ñ¼Æ¶Ç»¼
±z³ßÅw¹L¤@¦¨¤£Åܳæ½Õ¥jªOªº¤é¤l¶Ü¡H§Ú·Q¤@©w¬O¤d¦Ê­Ó¤£Ä@·N¡I¬Û¹ï©ó§Ú­Ìªº¨ç¼Æ¤]¤@¼Ë¡A¨Ò¦p§Ú­Ì¤W¤@­Ó½d¨Òex04_21.php¡A§Y¨Ï¥¦¥i¥H³Q­«½Æ©I¥s¨Ï¥Î¡A¦ý¨C¦¸¥u·|§b§bªº¦C¦L¡u¨ç¼Æ´ú¸Õ¡v³o´X­Ó¦r¡A³o¤Ó¤£Àô«O¤F§a¡I³Ì¦n¬O¡G§Ú§Æ±æ¥¦¿é¥X¤°»ò¥¦´N¿é¥X¤°»ò¡C
¬°¤FÅý¨ç¼Æ¹F¨ì¯u¥¿ªº¹ê¥Î©Ê¡A§Ú­Ì¥i¥H¦b¨ç¼Æ¤¤¥[¤J°Ñ¼Æ¶Ç»¼ªº¥\¯à¡A¨Ò¦p¡G
  1. //§t¦³¤@­Ó°Ñ¼Æªº¨ç¼Æ
  2. function MySub($x)
  3. {
  4.   echo $x;
  5. }
  6. //§t¦³¨â­Ó°Ñ¼Æªº¨ç¼Æ
  7. function YourSub($y,$z)
  8. {
  9.   echo ($y*$z);
  10. }
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

¶Ç»¼ÅܼƵ¹¦³°Ñ¼Æªº¨ç¼Æ
·í§Ú­Ì­n©I¥s¨ã¦³°Ñ¼Æªº¨ç¼Æ®É¡A¦b©I¥s¨ç¼Æ®É¥[¤Jªº°Ñ¼Æ¸ê®Æ¤£¤@©w¥²¶·¬O±`¼Æ¡A¶Ç»¼Åܼƥç§Y¥i¡A¨Ò¦p¡G
ex04_22.php
  1. <?
  2. //§t¦³¨â­Ó°Ñ¼Æªº¨ç¼Æ
  3. function YourSub($y,$z)
  4. {
  5.   echo ($y*$z);  //¿é¥Xµª®×
  6. }
  7. ?>
  8. <HTML>
  9. <HEAD>
  10. <TITLE>ex04_22</TITLE>
  11. </HEAD>
  12. <BODY>
  13. <?
  14. $I=10;
  15. $J=2;
  16. //©I¥s§t¦³¨â­Ó°Ñ¼Æªº¨ç¼Æ
  17. YourSub($I,$J);
  18. ?>
  19. </BODY></HTML>
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

°õ¦æ¦³°Ñ¼Æªº¨ç¼Æ
·í§Ú­Ì­n©I¥s¨ã¦³°Ñ¼Æªº¨ç¼Æ®É¡A¥u­n¦b©I¥s¨ç¼Æ®É¥[¤J°Ñ¼Æ¸ê®Æ§Y¥i¡A¨Ò¦p¡G§Ú­Ì­n©I¥s¤W¨Ò¤¤ªºMySub»PYourSub¨ç¼Æ¡C
  1. //©I¥s§t¦³¤@­Ó°Ñ¼Æªº¨ç¼Æ
  2. MySub("¦r¦ê¿é¥X");
½Æ»s¥N½X
  1. //§t¦³¨â­Ó°Ñ¼Æªº¨ç¼Æ
  2. YourSub(3,5);
½Æ»s¥N½X
¥HYourSub¨ç¼Æ¨Ó»¡¡A©I¥s¨ç¼Æ®É·|¥H3¡B5¨Ó´À¥N°Ñ¼Æy¡Bzªº­È¡A©Ò¥H·í°õ¦æYourSub¨ç¼Æ¤ºªº¡uecho($y*$z);¡v±Ô­z®É¡A´N·|¦bºô­¶¤¤¿é¥X3­¼5ªºµ²ªG15¡C
0.png
¹Ï4-19   °Ñ¼Æªº¶Ç»¼¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD