a:
ΪʲôҪʹÓûº´æ¼¼Êõ£¿ÀíÓɺܼòµ¥£ºÌá¸ßЧÂÊ¡£ÔÚ³ÌÐò¿ª·¢ÖУ¬»ñÈ¡ÐÅÏ¢µÄ·½Ê½Ö÷ÒªÊDzéѯÊý¾Ý¿â£¬³ý´ËÒÔÍ⣬Ҳ¿ÉÄÜÊÇͨ¹ýWeb Services»òÕß±ðµÄijÖÖ·½·¨£¬ÎÞÂÛÄÄÖÖ·½·¨£¬ÔÚ´óÁ¿µÄ²¢·¢·ÃÎÊÃæÇ°£¬ËüÃǶ¼¿ÉÄܳÉΪЧÂʵÄÆ¿¾±£¬ÎªÁ˽â¾öÕâЩÎÊÌ⣬ÈËÃÇÌá³öÁ˺ܶà½â¾ö·½°¸£¬ÆäÖÐÒ» ЩÊÇÀûÓÃÓÅ»¯Èí¼þ£¨È磺APC£¬Eaccelerator£¬Zend OptimizerµÈµÈ£©À´Ìá¸ß³ÌÐòµÄÔËÐÐЧÂÊ£¬ºÏÀíµÄÔËÓÃÕâЩÈí¼þ£¬ÍùÍùÄÜʹ³ÌÐòµÄÔËÐÐЧÂʵõ½ÊýÁ¿¼¶ÉϵÄÌáÉý£¬µ«Ç°ÌáÊÇÄã±ØÐëÓµÖ÷»úµÄ¿ØÖÆȨ£¬ÒÔ±ãÄÜ ¹»°²×°ÕâЩÈí¼þ£¬Èç¹ûÄãʹÓõÄÊÇÐéÄâÖ÷»úµÄ»°£¬ÄÇôֻÄÜÆíµ»ÄãµÄ·þÎñÌṩÉÌÒѾԤװÁËij¸öÓÅ»¯Èí¼þ£¬·ñÔò¾Í±ØÐë×Ô¼ºÊ¹ÓÃPHPÀ´ÊµÏÖÏàÓ¦µÄ»º´æ¹¦ÄÜ¡£Èç¹û ÕâÈÃÄã¸Ðµ½ÎÞËùÊÊ´Ó£¬ÏàÐÅÏÂÃæµÄÎÄ×ÖÄܸøÄãһЩÆô·¢¡£
ºÜ¶àPHP³ÌÐòÔ±¶¼Ê¹ÓÃAdodb+SmartyÕâÑùµÄ»Æ½ð´îµµ£¬ÄÇô¾ÍÏÈ¿´¿´ÈçºÎʹÓÃËüÃǵĻº´æ¹¦ÄÜ¡£
Ê×ÏÈ¿´¿´adodbÌṩµÄÊý¾Ý»º´æ¹¦ÄÜ£º
<?php
include('adodb.inc.php'); # load code common to ADOdb
$ADODB_CACHE_DIR = '/usr/ADODB_cache';
$conn = &ADONewConnection('mysql'); # create a connection
$conn->PConnect('localhost','userid','','agora');# connect t ......
ÔÚwindows ÏÂÅäÖÃPHPʹÓÃORACLEÊý¾Ý¿âÒªµã
ÔÚwindowÏ£¬¾³£ÓÃapache + PHP À´×öÓ¦ÓÃƽ̨£¬µ«ÊÇÈç¹ûʹÓÃoracle×öºǫ́Êý¾Ý¿â£¬µ«ÓÖûÓа²×°ÓÐoracle¿Í»§¶Ë£¬ÏÂÃæµÄÅäÖÿÉÒԲο¼
1¡¢ÔÚûÓа²×°oracleµÄ»úÆ÷ÉÏ£¬PHPÎÞ·¨¼ÓÔØphp_oci8.dllÄ£¿é£¬ÔÒòÊÇphp_oci8.dllÒÀÀµµÄÏà¹Ø×é¼þûÓÐÕÒµ½¡£
ÄãÕýÈ·ÉèÖÃÁËextension_dir = "C:\Apache\php\ext\"
²¢ÇÒ´ò¿ªÁË extension=php_oci8.dll
µ«ÊDz鿴apacheµÄÈÕÖ¾£¨ÔÚlogs/error.logÖУ©£¬·¢ÏÖÀàËƵĴíÎó
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache\\php\\ext\\php_oci8.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0
ÄǾͻáÊÇÉÏÃæÃèÊöµÄÇé¿ö£¬Ê¹ÓÃoracle8À©Õ¹ÐèÒª Oracle ¿Í»§¶Ë¿â¡£Windows Óû§ÐèÒªÖÁÉÙ°æ±¾ºÅΪ 10 µÄ¿â²ÅÄÜʹÓà php_oci8.dll¡£
µ½Õâ¸öµØÖ·ÏÂÔØÐèÒªµÄ°æ±¾ http://www.oracle.com/technology/tech/oci/instantclient/index.html
²»¹ý£¬ÏÂÔØÐèÒªÒ»¸ö×¢²á²Å¿ÉÒÔ£¬Èç¹ûÄãÒѾע²á¹ý£¬ÄÇôµÇ¼¾Í¿ÉÒÔÁË£¬ÄãÏ ......
ÔÚwindows ÏÂÅäÖÃPHPʹÓÃORACLEÊý¾Ý¿âÒªµã
ÔÚwindowÏ£¬¾³£ÓÃapache + PHP À´×öÓ¦ÓÃƽ̨£¬µ«ÊÇÈç¹ûʹÓÃoracle×öºǫ́Êý¾Ý¿â£¬µ«ÓÖûÓа²×°ÓÐoracle¿Í»§¶Ë£¬ÏÂÃæµÄÅäÖÿÉÒԲο¼
1¡¢ÔÚûÓа²×°oracleµÄ»úÆ÷ÉÏ£¬PHPÎÞ·¨¼ÓÔØphp_oci8.dllÄ£¿é£¬ÔÒòÊÇphp_oci8.dllÒÀÀµµÄÏà¹Ø×é¼þûÓÐÕÒµ½¡£
ÄãÕýÈ·ÉèÖÃÁËextension_dir = "C:\Apache\php\ext\"
²¢ÇÒ´ò¿ªÁË extension=php_oci8.dll
µ«ÊDz鿴apacheµÄÈÕÖ¾£¨ÔÚlogs/error.logÖУ©£¬·¢ÏÖÀàËƵĴíÎó
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache\\php\\ext\\php_oci8.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0
ÄǾͻáÊÇÉÏÃæÃèÊöµÄÇé¿ö£¬Ê¹ÓÃoracle8À©Õ¹ÐèÒª Oracle ¿Í»§¶Ë¿â¡£Windows Óû§ÐèÒªÖÁÉÙ°æ±¾ºÅΪ 10 µÄ¿â²ÅÄÜʹÓà php_oci8.dll¡£
µ½Õâ¸öµØÖ·ÏÂÔØÐèÒªµÄ°æ±¾ http://www.oracle.com/technology/tech/oci/instantclient/index.html
²»¹ý£¬ÏÂÔØÐèÒªÒ»¸ö×¢²á²Å¿ÉÒÔ£¬Èç¹ûÄãÒѾע²á¹ý£¬ÄÇôµÇ¼¾Í¿ÉÒÔÁË£¬ÄãÏ ......
PHP£¬JavaºÍ.NETµÄ¹ýÈ¥£¬ÏÖÔÚºÍδÀ´
±¾ÎĶÔWeb±à³ÌÓïÑÔ½øÐÐÁËÒ»·ÌÖÂÛ£¬ÌÖÂ۵ĶÔÏóÖ÷ÒªÊÇPHP£¬JavaºÍ.NETƽ̨ÉϵÄVB.NETºÍC#¡£ÎÄÕ¶ÔËÄÖÖÓïÑÔÔÚWeb¿ª·¢ÉϵÄÌصã½øÐÐÁ˼òÂÔµÄÃèÊö£¬²¢Ö÷ÒªÔÚÐÔÄÜ·½Ãæ½øÐÐÁ˱Ƚϡ£
¡¾51CTO¾«Ñ¡ÒëÎÄ¡¿PHP£¬JavaºÍ.NETÒѾ³ÉΪÁËδÀ´ÎåÄêÄÚ³ÌÐòÔ±±ØÐë¾ß±¸µÄ¼¼ÄÜ£¬¶øÕâÈýÖÖÓïÑÔ£¨»òÕß¿ÉÒÔ³Æ֮Ϊƽ̨£©¶¼ÔÚWeb¿ª·¢ÁìÓòÕ¼ÓÐһϯ֮µØ¡£µ±È»£¬Web¿ª·¢ÁìÓò»¹ÓÐÆäËûºÜ¶àÑ¡Ôñ£¬±ÈÈçRuby£¬PythonÒÔ¼°RIA¼¼ÊõµÈµÈ¡£²»¹ý£¬µ¥¶À½«ÕâÈýÖÖÖ÷Á÷µÄ¿ª·¢Æ½Ì¨½øÐбȽϣ¨ÔÚ×îеÄ9Ô±à³ÌÓïÑÔÅÅÐаñÉÏ£¬Java¡¢PHP¡¢Visual BasicºÍC#·Ö±ð´¦ÓÚµÚ1¡¢3¡¢5¡¢7ÃûµÄλÖᣵ±È»£¬ÅÅÐаñËùͳ¼ÆµÄÁìÓò²»ÏÞÓÚWeb¿ª·¢£©£¬Ò²ÊÇÓÐÒ»¶¨¼ÛÖµµÄ¡£ÏÂÃæµÄÕâƪ²©ÎĶÔÓÚPHP£¬JavaºÍ.NETÔÚWeb¿ª·¢ÁìÓòµÄ¾ºÕùÐÔ½øÐÐÁËÒ»·¬Ì½ÌÖ£¬ÎÄÕÂÓÐÆäÖ÷¹ÛƬÃæÖ®´¦£¬²»¹ýÆäÖйØÓÚÈýÖÖƽ̨ÌصãµÄ±È½Ï»¹ÊǺÜÓÐȤµÄ¡£ÒÔÏÂÊDz©ÎĵÄÔÎÄ£º
×òÌìÎÒºÍÎÒµÄһλÅóÓѶÔWeb±à³ÌÓïÑÔ½øÐÐÁËÒ»·ÌÖÂÛ£¬ÔÚ´ËÆڼ䣬ÎÒÃÇÌÖÂÛÁ˸÷ÖÖ±à³ÌÓïÑÔ£¨PHP£¬Java£¬VBºÍC#£©ÒÔ¼°ËüÃÇÔÚWeb¿ª·¢·½ÃæµÄ¾ºÕùÐÔ¡£ÓÉÓÚÕâ¸öÖ÷Ìâ·Ç³£ÓÐȤ£¬¶øÇÒÖµµÃÉÌȶ£¬ÓбØÒª¶Ô´Ë×öÒ»ÏÂ×ܽᡣ
PHP£º¹ýÈ¥£¬ÏÖÔÚºÍδÀ´
Ê×ÏÈÎÒ»¹ÊÇ´ÓÎÒÊìϤµÄPHP¿ªÊ¼£¬ËüÊÇÎÒ×î ......
PHP£¬JavaºÍ.NETµÄ¹ýÈ¥£¬ÏÖÔÚºÍδÀ´
±¾ÎĶÔWeb±à³ÌÓïÑÔ½øÐÐÁËÒ»·ÌÖÂÛ£¬ÌÖÂ۵ĶÔÏóÖ÷ÒªÊÇPHP£¬JavaºÍ.NETƽ̨ÉϵÄVB.NETºÍC#¡£ÎÄÕ¶ÔËÄÖÖÓïÑÔÔÚWeb¿ª·¢ÉϵÄÌصã½øÐÐÁ˼òÂÔµÄÃèÊö£¬²¢Ö÷ÒªÔÚÐÔÄÜ·½Ãæ½øÐÐÁ˱Ƚϡ£
¡¾51CTO¾«Ñ¡ÒëÎÄ¡¿PHP£¬JavaºÍ.NETÒѾ³ÉΪÁËδÀ´ÎåÄêÄÚ³ÌÐòÔ±±ØÐë¾ß±¸µÄ¼¼ÄÜ£¬¶øÕâÈýÖÖÓïÑÔ£¨»òÕß¿ÉÒÔ³Æ֮Ϊƽ̨£©¶¼ÔÚWeb¿ª·¢ÁìÓòÕ¼ÓÐһϯ֮µØ¡£µ±È»£¬Web¿ª·¢ÁìÓò»¹ÓÐÆäËûºÜ¶àÑ¡Ôñ£¬±ÈÈçRuby£¬PythonÒÔ¼°RIA¼¼ÊõµÈµÈ¡£²»¹ý£¬µ¥¶À½«ÕâÈýÖÖÖ÷Á÷µÄ¿ª·¢Æ½Ì¨½øÐбȽϣ¨ÔÚ×îеÄ9Ô±à³ÌÓïÑÔÅÅÐаñÉÏ£¬Java¡¢PHP¡¢Visual BasicºÍC#·Ö±ð´¦ÓÚµÚ1¡¢3¡¢5¡¢7ÃûµÄλÖᣵ±È»£¬ÅÅÐаñËùͳ¼ÆµÄÁìÓò²»ÏÞÓÚWeb¿ª·¢£©£¬Ò²ÊÇÓÐÒ»¶¨¼ÛÖµµÄ¡£ÏÂÃæµÄÕâƪ²©ÎĶÔÓÚPHP£¬JavaºÍ.NETÔÚWeb¿ª·¢ÁìÓòµÄ¾ºÕùÐÔ½øÐÐÁËÒ»·¬Ì½ÌÖ£¬ÎÄÕÂÓÐÆäÖ÷¹ÛƬÃæÖ®´¦£¬²»¹ýÆäÖйØÓÚÈýÖÖƽ̨ÌصãµÄ±È½Ï»¹ÊǺÜÓÐȤµÄ¡£ÒÔÏÂÊDz©ÎĵÄÔÎÄ£º
×òÌìÎÒºÍÎÒµÄһλÅóÓѶÔWeb±à³ÌÓïÑÔ½øÐÐÁËÒ»·ÌÖÂÛ£¬ÔÚ´ËÆڼ䣬ÎÒÃÇÌÖÂÛÁ˸÷ÖÖ±à³ÌÓïÑÔ£¨PHP£¬Java£¬VBºÍC#£©ÒÔ¼°ËüÃÇÔÚWeb¿ª·¢·½ÃæµÄ¾ºÕùÐÔ¡£ÓÉÓÚÕâ¸öÖ÷Ìâ·Ç³£ÓÐȤ£¬¶øÇÒÖµµÃÉÌȶ£¬ÓбØÒª¶Ô´Ë×öÒ»ÏÂ×ܽᡣ
PHP£º¹ýÈ¥£¬ÏÖÔÚºÍδÀ´
Ê×ÏÈÎÒ»¹ÊÇ´ÓÎÒÊìϤµÄPHP¿ªÊ¼£¬ËüÊÇÎÒ×î ......
×î½ü×öÁ˼¸¸öСÐ͵ÄÏîÄ¿£¬±È½Ï¼òµ¥£¬Ö»ÊÇÐèҪϸÐÄ£¬¶¼¿ÉÒÔÍê³É£¬Ö÷ÒªÊǶÔMVCģʽµÄÊìÁ·Ó¦Ó㬶ÔWEBÀ࿪·¢»¹ÊǺÜÓаïÖúµÄ¡£
¸Õ¿ªÊ¼µÄµÚÒ»¸öСÏîÄ¿£¬ÓÃÀ´Á·ÊÖ£¬È»ºóÎÒÈ«²¿ÊÇÁ÷³Ì»¯µÄ±à³Ì¡£´úÂëÒ²¾Í400ÐÐ×óÓÒ¡£½á¹ûÎҵĵ¼Ê¦£¬¾õµÃ´úÂë½á¹¹²»ÇåÎú£¬²»ÈÝÒ×
ά»¤£¬ÐèÒªÐ޸ġ£ÐèÒªÎÒ²ÉÓÃOOÀàµÄ±à³Ì·½Ê½½øÐиÄд¡£ÎÒÒÔǰдPHP£¬¼¸ºõÈ«²¿Êǽṹ»¯µÄ´úÂë¡£¿ªÊ¼Ð´OO·½ÃæµÄ´úÂ룬»¹ÕæµÄ²»
ÊìϤÁË¡£ÒÔÇ°×öJAVAµÄʱºò£¬Ð´ClassÊǺܵÃÐÄÓ¦Êֵġ£ÖØпªÊ¼Ñ§Ï°OO£¬¼¸¸öСʱ£¬ÂýÂý¾ÍÃþÊìϤÁË¡£
È»ºóµÚ¶þ¸ö°æ±¾³öÀ´ÁË£¬È«²¿ÔÚÒ»¸öÀàÖУ¬µ÷ÓÃÁËN¸ö»¥²»Ïà¸ÉµÄ·½·¨¡£ÊµÀý»¯Õâ¸öÀ࣬Ȼºóµ÷Ó㬸㶨¡£
µ¼Ê¦ÒÀÈ»¾õµÃ½á¹¹²»Ã÷Îú£¬Ö»ÊDZȵÚÒ»¸ö°æ±¾ÓÐЩ¸Ä½ø¡£ÓÚÊǸúÎÒÏêϸµÄ½²½âÁËMVCµÄģʽ£¬ÎÒÔÚ½ÓÏÂÀ´µÄ¼¸¸ö°æ±¾£¬¶¼²ÉÓÃÁËMVCģʽ£º
£¨1£©Model²ã£º¹¹ÔìÒ»¸öClassÀ࣬ȻºóÔÚPHP5ÖеÄpublic function __construct(){}£¬¶ÔһЩ˽ÓбäÁ¿½øÐгõʼ»¯£¬È»ºóÔÚÐèÒªµÄ
µØ·½µ÷ÓÃ$this->_var£»ËüÖ»¸ºÔðºÍÊý¾ÝÔ´´ò½»µÀ£¬±ÈÈçDB£¬Îļþ£¬»òÕßÆäËû¡£
£¨2£©Control² ......
1.phpÖеÄ__FILE__³£Á¿·µ»ØÎļþµÄÍêÕû·¾¶ºÍÎļþÃû.
2.dirname(__FILE___) º¯Êý·µ»ØµÄÊǽű¾ËùÔÚÔڵķ¾¶¡£
±ÈÈçÎļþ b.php °üº¬ÈçÏÂÄÚÈÝ£º
<?php
$basedir = dirname(__FILE__);
?>
Èç¹ûb.php±»ÆäËûĿ¼ÀïµÄa.phpÎļþrequire »òÕß include È¥ÒýÓõĻ°¡£
±äÁ¿?$basedir µÄÄÚÈÝ»¹ÊÇb.phpËùÔÚµÄÄǸöÎļþ¼ÐµÄ·¾¶¡£
¶ø²»ÊDZä³Éa.phpÎļþËùÔÚµÄĿ¼¡£
3.dirname(__FILE__) Ò»°ã»á·µ»ØÎļþËùÔÚµ±Ç°Ä¿Â¼µ½ÏµÍ³¸ùĿ¼µÄÒ»¸öĿ¼½á¹¹,²»»á·µ»Øµ±Ç°µÄÎļþÃû³Æ¡£
×¢£ºdirname(__FILE__) Ò²¿ÉÄÜ·µ»ØÒ»¸ö . (µ±Ç°Ä¿Â¼)
4.ʹÓ÷½·¨Ìáʾ,¡¡
Èç¹ûÖظ´Ò»´Î¿ÉÒÔ°ÑĿ¼ÍùÉÏÌáÉýÒ»¸ö²ã´Î:
±ÈÈ磺?$d = dirname(dirname(__FILE__));
Æäʵ¾ÍÊÇ°ÑÒ»¸öĿ¼¸ødirname()×ö²ÎÊýÁË£®ÒòΪdirname()·µ»Ø×îºóµÄĿ¼²»´ø£Ü£Ü»òÕßÊÇ£¯
ËùÒÔÖظ´Ê¹ÓõÄʱºò¿ÉÒÔÈÏΪ¡¡dirname()¡¡°Ñ×îϲãµÄĿ¼µ±³ÉÎļþÃûÀ´´¦ÀíÁË£®ÕÕ³£·µ»Ø
µ±Ç°Ä¿Â¼µÄÉϼ¶Ä¿Â¼.ÕâÑùÖظ´¾ÍµÃµ½ÁËËüµÄÉÏÒ»¼¶µÄĿ¼.
5.°üº¬µÃµ½ÉÏÒ»¼¶Ä¿Â¼µÄÎļþ
include(dirname(__FILE__).’/../filename.php’); ......
ÔÎÄת×Ô £ºhttp://home.phpchina.com/space.php?uid=49655&do=blog&id=182488
Ò»£® ±Ø±¸ÖªÊ¶
1.wsdl(web·þÎñ±ê¼ÇÓïÑÔ)
WSDL£¨ÍøÂç·þÎñÃèÊöÓïÑÔ£¬Web Services Description Language£©ÊÇÒ»ÃÅ»ùÓÚ XML
µÄÓïÑÔ£¬ÓÃÓÚÃèÊö Web Services ÒÔ¼°ÈçºÎ¶ÔËüÃǽøÐзÃÎÊ¡£
¾ßÌå²Î¿¼Çë·ÃÎÊÏÂÃæÍøÖ·
http://www.w3school.com.cn/wsdl/index.asp
2.soap
SOAP ÊÇÒ»ÖÖ¼òµ¥µÄ»ùÓÚ XML µÄÐÒ飬ËüʹӦÓóÌÐòͨ¹ý HTTP À´½»»»ÐÅÏ¢¡£
¾ßÌå²Î¿¼Çë·ÃÎÊÏÂÃæÍøÖ·
http://www.w3school.com.cn/soap/index.asp
3.phpÀ©Õ¹
¾ßÌå²Î¿¼Çë·ÃÎÊÏÂÃæÍøÖ·
http://php.net/manual/en/book.soap.php
¶þ£® php soap¿ª·¢Ä£Ê½
1. working in swdl mode(ÆõÔ¼ÏÈÐÐ(Contract first)ģʽ)
¡¡¡¡ÆõÔ¼ÏÈÐÐģʽʹÓÃÁËÒ»¸öÓÃXML¶¨ÒåµÄ·þÎñ½Ó¿ÚµÄWSDLÎļþ¡£WSDLÎļþ¶¨ÒåÁË·þÎñ±ØÐëʵÏÖ»ò¿Í»§¶Ë±ØÐëʹÓõĽӿڡ£SoapServer
ºÍSoapClientµÄWSDLģʽ¾Í»ùÓÚÕâ¸ö¸ÅÄî¡£Ò²¾ÍÊÇÓÃsoapͨѶµÄʱºò±ØÐëÏÈ ......