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

windowsÏ¿ª·¢PHPÀ©Õ¹dll£¨ÎÞÐèCygwin£©

windowsÏ¿ª·¢phpÀ©Õ¹ÍøÉϺܶà×ÊÁ϶¼ËµÐèÒªCygwin£¬ÆäʵÍêÈ«¿ÉÒÔ²»±Ø°²×°¸Ã¶«¶«¡£Ã»´í£¬ÊÇ¿ÉÒÔÔÚlinuxÏÂÉú³É¹Ç¼Üºó¿½µ½windosÏÂÀ´Ó㬵«ÊÇ£¬Èç¹ûûÓÐlinux»·¾³ÄØ£¿Ê²Ã´£¬×°ÐéÄâ»ú£¿ÎÒÔΣ¬ÄãÕ¦ÓÖÈÆ»ØÈ¥ÁË- -£¡ ³ýÁ˱àÒëÍ⣬shell»·¾³Ö÷Òª¾ÍÊÇΪÁËÉú³ÉÀ©Õ¹µÄ¹Ç¼Ü£¬Æäʵ¹Ç¼ÜÒѾ­ÔÚphpÔ´Âë°üÖÐÁËÁË£¬ÎÒÃÇÖ»ÐèÒª°ÑÏà¹ØÃû×ÖÌ滻һϼ´¿ÉʹÓá£
×¼±¸£º
1¡¢phpÔ´Âë°üºÍwindowsϵĶþ½øÖÆ°ü£¬ÒÔ¼°°²×°Visual C++£¬²¢°ÑMicrosoft Visual Studio\Common\MSDev98\BinµÄ¾ø¶Ô·¾¶Ìí¼Óµ½windows»·¾³±äÁ¿
2¡¢½âѹԴÂë°üµ½d:\php_src
3¡¢½øÈëd:\php_src\extĿ¼£¬¸´ÖÆskeletonÎļþ¼Ð£¬²¢ÖØÃüÃûΪҪ¿ª·¢À©Õ¹µÄÃû×Ö£¬±¾ÀýΪ“linvo”
4¡¢°Ñ¶þ½øÖÆ°üÖÐdevĿ¼ÏµÄphp5ts.libÎļþ£¬¿½Èëн¨µÄlinvoĿ¼
5¡¢±à¼­linvoĿ¼ÖеÄphp_skeleton.h¡¢skeleton.c¡¢skeleton.dspÕâÈý¸öÎļþ£¬Ìæ»»ÄÚÈÝÖÐËùÓÐextnameΪlinvo£¬EXTNAMEΪLINVO¡££¨ÑϸñÇø·Ö´óСд£©
±àÂ룺
6¡¢±à¼­php_skeleton.hÎļþ£¨Í·Îļþ£©
ÔÚPHP_FUNCTION(confirm_linvo_compiled);ÏÂÃæ±àд
PHP_FUNCTION(hello);
ÉùÃ÷Ò»¸öhelloº¯Êý
7¡¢±à¼­skeleton.cÎļþ£¨Ö÷Îļþ£©
ÔÚPHP_FE(confirm_linvo_compiled,        NULL) ÏÂÃæ±àд
PHP_FE(hello,        NULL)
ÕâÊǺ¯ÊýÈë¿Ú£¬ÏÂÃæ¸Ãдº¯ÊýÖ÷ÌåÁË
ÕÒµ½PHP_FUNCTION(confirm_test_compiled)º¯Êý£¬¸Ãº¯ÊýÊDzâÊÔº¯Êý£¬Ôڸú¯ÊýºóÃæÐÂдһ¸öº¯Êý
PHP_FUNCTION(hello)
{
        char *arg = NULL;
        int arg_len, len;
        char *strg;
    /* ½ÓÊÕ²ÎÊý */
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) {
                return;
        }
        len = spprintf(&strg, 0, "Hello,%s", arg);
    RETURN_STRINGL(strg, len, 0);
}
¸´ÖÆ´úÂë
±àÒ룺
8¡¢ÔËÐÐcmdÃüÁîÐУ¬½øÈëd:\php_src\ext\linvoĿ¼
9¡¢ÊäÈë msdev linvo.dsp /MAKE "linvo - Win32 Release_TS"
10¡¢Èç¹ûûÓдíÎó£¬ÔòÔÚphp_srcĿ¼Ï»áÉú³ÉÒ»¸öRelease_TSÎļþ¼Ð£¬ÀïÃæ¾ÍÊDZàÒëºÃµÄphp_linvo.dllÀ©Õ¹


Ïà¹ØÎĵµ£º

php mysql ²ÉÓà utf 8 µÄÅäÖÃ

1¡¢ÔÚÅäÖÃmysqlʵÀýµÄÓïÑÔÑ¡Ïîʱ£¬Ñ¡Ôñutf-8
2¡¢ÔÚhtml,phpÒ³ÃæÖÐ ¼ÓÉÏ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />£¬Èç¹û²»ÐÐÔÙÔÚ phpÎļþ Æðʼ´¦¼Ó header("Content-Type:text/html;charset=utf-8");
3¡¢ÔÚphpÖÐ×öÊý¾Ý¿âÁ¬½Óʱ£¬ÎÒÓõÄʱpdoµÄÐÎʽ£¬Ë ......

magento ʹÓõÚÈý·½PHP¿â

Magento×ñÑ­Ò»°ãµÄ·½·¨Ê¹ÓõÚÈý·½PHP¿â,¼´£º½«php¿â·Åµ½Ä³¸öĿ¼Ï£¬ÔÚphp.ini»ò³ÌÐòÍ·²¿Ö¸¶¨¸ÃĿ¼»òÕ߸¸Ä¿Â¼Ö¸¶¨Îªinclude_path£¬È»ºó³ÌÐòÖÐʹÓÃinclude_onceÏà¶Ô·¾¶°üº¬¾ßÌåÒýÓõÄphpÎļþ 
MagentoµÄlibĿ¼ÒѾ­Ä¬ÈÏÖ¸¶¨Îªinclude_pathÀïÁË£¬ËùÒÔÈç¹ûÓÐ3rd°üÈçVarien·Åµ½libĿ¼ÏÂ,ÓÐÒ»¸öphpÎļþÈ«ÃûΪ$magento_h ......

phpÔÚ2003SERVERϵÄÅäÖÃ

Ò»¡¢ÏµÍ³»·¾³¼°³ÌÐò˵Ã÷
1¡¢²Ù×÷ϵͳΪwindows server 2003
2 ¡¢iis°æ±¾Îª6.0
3¡¢php°æ±¾Îª5.2.9,¹Ù·½ÏÂÔصØÖ·: http://www.php.net/downloads.php
4¡¢mysql°æ±¾Îª5.1.34,¹Ù·½ÏÂÔصØÖ·:http://dev.mysql.com/downloads/mysql
¶þ¡¢°²×°iis
1¡¢²åÈëwindows server 2003ϵͳ°²×°¹âÅÌ
2¡¢¿ªÊ¼-¿ØÖÆÃæ°å-Ìí¼Óɾ³ý³ÌÐ ......

ѧϰphp Reflection£¨¶þ£©

(4)Ó³ÉäÀà(ReflectionClass)
ReflectionClassÀàÔÊÐíÄã·´ÏòÓ³ÉäÀà¡£
<?
php
interface MySerializable  
{    
// ...}
class My
Object
 
{    
// ...}
/** A counter class */
class 
Counter 
exten ......

PHP autoload»úÖÆÏê½â

(1) autoload»úÖƸÅÊö
ÔÚʹÓÃPHPµÄOOģʽ¿ª·¢ÏµÍ³Ê±£¬Í¨³£´ó¼ÒÏ°¹ßÉϽ«Ã¿¸öÀàµÄʵÏÖ¶¼´æ·ÅÔÚÒ»¸öµ¥¶ÀµÄÎļþÀÕâÑù»áºÜÈÝÒ×ʵÏÖ¶ÔÀà½øÐи´Óã¬Í¬Ê±½«À´Î¬»¤Ê±Ò²ºÜ±ãÀû¡£ÕâÒ²ÊÇOOÉè¼ÆµÄ»ù±¾Ë¼ÏëÖ®Ò»¡£ÔÚPHP5֮ǰ£¬Èç¹ûÐèҪʹÓÃÒ»¸öÀֻ࣬ÐèÒªÖ±½ÓʹÓÃinclude/require½«Æä°üº¬½øÀ´¼´¿É¡£ÏÂÃæÊÇÒ»¸öʵ¼ÊµÄÀý×Ó£º
CODE:
/* ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ