Óà SWIG ¹¹½¨ PHP À©Õ¹
ÄÏÈý·½
×÷ÕߣºMartin Streicher, Èí¼þ¿ª·¢ÈËÔ±, Pixel, Byte, and Comma
¾¡¹Ü±àдһ¸ö PHP À©Õ¹²¢²»ÊǺÜÀ§ÄÑ£¬¶ø SWIG µÄÈ·½øÒ»²½¼ò»¯ÁËÕâÏîÈÎÎñ£¬ÕâÖ÷ÒªÊÇÒòΪËü×Ô¶¯»¯Á˽áºÏ PHP Óë C »ò C++ ËùÐèµÄ¹¤×÷¡£Èô¸ø¶¨¶ÔÒ»¸öº¯ÊýµÄÃè»æ — º¯ÊýµÄÃû³Æ¼°ÆäÐβΠ— SWIG ¾Í»áÉú³ÉÒ»¸ö°ü×°³ÌÐòÀ´½« PHP ÓëµÍ²ã´úÂëÁ¬½ÓÆðÀ´¡£
SWIG ÐèҪһЩǰÌáÌõ¼þ¡£SWIG µÄһЩ×îа汾ÐèÒª PHP µÄ°æ±¾ÊÇ V5¡£´ËÍ⣬»¹ÐèÒªÓÐÒ»¸ö C/C++ ±àÒëÆ÷£¬±ÈÈç GNU Compiler Collection (GCC)£¬ÒÔ¼° PHP Module Development Kit (MDK)¡£ÌرðÊÇÄú»¹ÒªÓÐÓë PHP °²×°Ïà¹ØµÄÍ·Îļþ¡£Èç¹ûÄúʹÓõÄÊÇ Ubuntu Linux ® »òÒ»¸ö Debian µÄ±äÌå²¢ÇÒÒѾ´ÓÒ»¸ö°ü´æ´¢¿â°²×°ÁË PHP V5£¬ÄÇôһ°ã¶øÑÔÄú¾Í¿ÉÒÔʹÓà Advanced Packaging Tool (APT) Ìí¼Ó MDK ÁË¡£ÀýÈ磬ÔÚ Ubuntu ÄÚºË 9.10 ÉÏ£¬¼üÈë apt-get install sudo apt-get install --install-recommends --yes php5-dev¡£
½ØÖ¹µ½ 2009 Äêµ×£¬SWIG µÄ×îа汾ÊÇ V1.3.40£¨²Î¼û ²Î¿¼×ÊÁÏ£©¡£ÏÂÔØ tarball £¨Ò»¸öÓÉ gzip ѹËõÁ赀 TAR Îļþ£©£¬½«Ëü½âѹËõ£¬È»ºóÕë¶ÔÄúµÄϵͳÅäÖÃÕâЩ´úÂ룬¹¹½¨²¢°²×°Õâ¸öÈí¼þ¡££¨ÒªÏëÕÒµ½ËùÓеÄÅäÖÃÑ¡ÏÔËÐÐ ./configure --help£©¡£Çåµ¥ 1 ÌṩÁËÏÂÔØ¡¢½âѹËõºÍ°²×° SWIG ËùÐèµÄÃüÁî¡£
Çåµ¥ 1. ÏÂÔØ¡¢½âѹËõºÍ°²×° SWIG
$ wget http://prdownloads.sourceforge.net/swig/swig-1.3.40.tar.gz
$ tar xzf swig-1.3.40.tar.gz
$ cd swig-1.3.40
$ ./configure
$ make
$ sudo make install
$ which swig
/usr/local/bin/swig
¹¹½¨Ò»¸öÀ©Õ¹
ÈÃÎÒÃǹ¹½¨Ò»¸öÀ©Õ¹À´Óà Linux mcrypt ¿â¼ÓÃܺͽâÃÜÏûÏ¢¡£PHP ÌṩÁËÒ»¸ö mcrypt ¿â£¬µ«Ëü²»¹ýÊǶԴ˿âµÄ C °æ±¾ÉÔ×÷ÐÞÊκóµÄ½á¹û¡£ÏÖÔÚ£¬ÈÃÎÒÃǹ¹½¨Á½¸ö¸üΪ¼ò½àµÄ·½·¨£ºÒ»¸öÓÃÀ´¼ÓÃÜ×Ö·û´®£¬ÁíÒ»¸öÓÃÀ´½âÃÜ×Ö·û´®¡£
ÔÚ Ubuntu »òÓëÆäÏàËƵÄϵͳÉÏ£¬Äú¿ÉÒÔÓà APT °²×°Ç¡µ±µÄ mcrypt ¿âºÍÍ·Îļþ£º$ sudo apt-get install libmcrypt-dev libmcrypt4 mcrypt libmhash2¡£
ÈôÄúÄþÔ¸´ÓÍ·¿ªÊ¼¹¹½¨£¬»òÕßÄúµÄ·Ö²¼°æÄÚ²»°üÀ¨ mcrypt£¬ÄÇô¿ÉÒÔ´ÓËüµÄÖ÷Ò³ÉÏÏÂÔØÔ´´úÂ루²Î¼û ²Î¿¼×ÊÁÏ£©¡£Ìæ´úÁË crypt µÄ mcrypt ʵÓóÌÐòÒ²ÒÀÀµÓÚ libmhash£¬Òò´Ë±ØÐëÔÚ±àÒë mcrypt ֮ǰ¹¹½¨ libmhash¡£Çåµ¥ 2 ¸ø³öÁ˹¹½¨ libmhash ËùÐèµÄ´úÂë¡£
Çåµ¥ 2. ¹¹½¨ libmhash
$ # libmhash
$ wget
Ïà¹ØÎĵµ£º
PHPÊǸöΰ´óµÄweb¿ª·¢ÓïÑÔ£¬Áé»îµÄÓïÑÔ£¬µ«ÊÇ¿´µ½php³ÌÐòÔ±Öܶø¸´Ê¼µÄ·¸µÄһЩ´íÎó¡£ÎÒ×öÁËÏÂÃæÕâ¸öÁÐ±í£¬ÁгöÁËPHP³ÌÐòÔ±¾³£·¸µÄ10ÖдíÎ󣬴ó¶àÊýºÍ°²È«Ïà¹Ø¡£¿´¿´Äã·¸Á˼¸ÖÖ£º
1.²»×ªÒâhtml entities
Ò»¸ö»ù±¾µÄ³£Ê¶£ºËùÓв»¿ÉÐÅÈεÄÊäÈ루ÌرðÊÇÓû§´ÓformÖÐÌá½»µÄÊý¾Ý£© £¬Êä³ö֮ǰ¶¼Òª×ªÒâ¡£
echo $_GET['usenam ......
×î½üŪPHPÓʼþ·¢ËÍʱ£¬´ÓÍøÉÏÔØÁ˶δúÂ룬×ÜÊÇÓÐЩÎÊÌ⣬ËùÒÔ¶ÔÕâЩÎÊÌâµÄ½â¾ö×÷Ò»¸ö¼Ç¼£¬·½±ãÒÔºó²éÔÄ¡£
PHP·¢ËÍÓʼþ£º
1¡¢class.phpmailer.php Àà°üµÄ¹ÙÍøÏÂÔØ×îаæµÄphpmailerÀ࣬Ҫע²áµÄŶ¡£
2¡¢×¢Òâ¿´ÄãµÄ·¢ËÍÓÊÏäÊDz»ÊÇ¿ªÍ¨µÄSMTP·þÎñ¡£µÇ¼ÓÊÏä -> ÉèÖ㬠²é¿´ÊÇ·ñÖ§³ÖSMTP»òÊÇ·ñ¿ªÆô¡£
3¡¢ÎÊÌ⣺it is no ......
ÔÚPHP¿ª·¢ÖжԱÈÆðCookie£¬session ÊÇ´æ´¢ÔÚ·þÎñÆ÷¶ËµÄ»á»°£¬Ïà¶Ô°²È«£¬²¢ÇÒ²»Ïñ Cookie ÄÇÑùÓд洢³¤¶ÈÏÞÖÆ.ÓÉÓÚ Session ÊÇÒÔÎı¾ÎļþÐÎʽ´æ´¢ÔÚ·þÎñÆ÷¶ËµÄ£¬ËùÒÔ²»Å¿ͻ§¶ËÐÞ¸Ä Session ÄÚÈÝ¡£Êµ¼ÊÉÏÔÚ·þÎñÆ÷¶ËµÄ Session Îļþ£¬PHP ×Ô¶¯ÐÞ¸Ä session ÎļþµÄȨÏÞ£¬Ö»±£ÁôÁËϵͳ¶ÁºÍдȨÏÞ£¬¶øÇÒ²»ÄÜͨ¹ý ftp Ð޸ģ¬ËùÒÔ° ......
×î½ü¸ø¹«Ë¾×öÒ»¸ö¼òµ¥µÄÍøÉÏÏîÄ¿£¬ÓÚÊÇÏëµ½ÁËÓÿªÔ´µÄ³ÌÐò£¬ËÑÁËһϣ¬¸Ð¾õͦÓÐÓõģ¬¾Í·¢ÉÏÀ´ÁË¡£
¹úÄÚPHP¿ªÔ´½¨Õ¾³ÌÐòÒ»ÀÀ
¹úÍâµÄ¿ªÔ´¼¼ÊõÒ²Ó°ÏìºÍÍƶ¯Á˹úÄÚ¿ªÔ´³ÌÐòµÄ·¢Õ¹£¬ÉÏÎÄÎÒ½éÉܵġ¶¹úÍâÓÅÐ㿪ԴPHP½¨Õ¾³ÌÐòÒ»ÀÀ¡· ÖУ¬ºÜ¶à¹úÍ⿪Դ³ÌÐò²¢²»Ì«·ûºÏÖйúÈ˵ÄʹÓÃÏ°¹ß£¬¶ø¹úÄÚÓÐһЩ³§¼Ò»ò¸öÈËÒ²×öÁËһЩ²»´íµÄ²úÆ ......