PHP Ϊʲôfunction
PHP Ϊʲôfunction ÔÚÉùÃ÷ʱûÓÐÉùÃ÷²ÎÊý,¶øµ÷ÓÃʱ¼ÓN¸ö²ÎÊýÈ´ÊÇÔÊÐíµÄ
2008-11-13 20:14:38 ÆäËû | ÆÀÂÛ(7) | ä¯ÀÀ(721)
ÈçÌâ
//ÉùÃ÷
function test(){};
$a = '';
$b = '';
$c = '';
//µ÷ÓÃ
test($a,$b,$c,1,2,3);
ÏàÐŲ»ÉÙÐֵܽãÃÃÒ²Ôø¾Óöµ½Í¬ÑùµÄÎÊÌâ¡£
why?
¸Õ¿ªÊ¼ÎÒҲͦÓôÃÆ£¬ºó·ÁË·ÊÖ²áÕÒµ½ÁË´ð°¸
--------------------------------------
PHP supports passing arguments by value (the default), passing by reference, and default argument values. Variable-length argument lists are also supported, see also the function references for func_num_args(), func_get_arg(), and func_get_args() for more information.
---------------------------------------------
ÔÀ´PHPÖ§³Ö±ä³¤²ÎÊýÁÐ±í£¨Variable-length argument lists £©
int func_num_args(void)¿ÉÒԵõ½²ÎÊý³¤¶È
such as:
function test()
{
echo func_num_args();
}
test(0, 1, 2, 3); // ÏÔʾ: 4
mixed func_get_arg(int $arg_num)¿ÉÒԵõ½Ò»¸ö²ÎÊýÖµ
such as:
function test()
{
echo func_get_arg(2);
}
test('a', 'b', 'c'); //ÏÔʾ£ºc
array func_get_args(void) ¿ÉÒԵõ½Ò»×éarray²ÎÊý
such as:
function test()
{
var_dump(func_get_args());
}
test('a', 'b', 'c'); //ÏÔʾ£ºarray(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" }
PS£ºÓÐÎÊÌâ? ÏÈ·ÊÖ²á°É ^_^
Ïà¹ØÎĵµ£º
<?php
//¸Ä±äÊý¾Ý¿âÃûÖ®ºó¼´¿ÉʹÓõķÖÒ³
include 'conn.php'; //ÕâÀïÌí¼ÓÒ»¸öÊý¾Ý¿âÁ¬½Ó¼´¿É£¬±ä»»³É×Ô¼ºÉ趨µÄÁ´½Ó
$page=$_GET['page']; //·Ò³Ñ¡Ïî Ê×Ò³£¬ÏÂÒ»Ò³£¬ÉÏÒ»Ò³£¬Î²Ò³
$current= $_GET ......
´ò¿ªEditplus£¬Ñ¡Ôñ¹¤¾ß=¡·ÅäÖÃÓû§¹¤¾ß£¬¾ÍÓõ±Ç°µÄĬÈÏ×éºÃÁË¡£µ¥»÷“Ìí¼Ó¹¤¾ß”Ñ¡ÔñµÚÒ»¸ö×ÓÏÌÐò”£¬È¡¸öÃû×Ö¸øËü£¬“PhpDebug”°É¡£ÔÚÃüÁîÖÐä¯ÀÀµ½php.exeµÄλÖ㬲ÎÊýÑ¡ÔñΪ“Îļþ·¾¶”£¬ÕâʱÎҵĽçÃæÉÏÁ½¸öÊäÈë¿òÖзֱðΪ“D:\usr\php.exe”ºÍ&ldquo ......
PHPÔËÐйý³Ì
¼òµ¥µãµÄ
ä¯ÀÀÆ÷ -> web·þÎñÆ÷ -> php½âÊÍÆ÷ -> mysql·þÎñÆ÷ -> php½âÊÍÆ÷ -> web·þÎñÆ÷ -> ä¯ÀÀÆ÷
´ó¼ÒÎÕ¼¸¸öÊÖ
¸´ÔÓµãµÄ ä¯ÀÀÆ÷ -----------------------------> web·þÎñÆ÷-> php½âÊÍÆ÷ -> mysql·þÎñÆ÷ ….
PHPÔËÐлúÖÆ
2009-10-20 ......
Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ã濪·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii.Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server 2000+MySQL5.0£¬CLUS ......