Zend AMF+Flex+PHPµÄÒ»µãµãСÎÊÌâ
×òÌìÍíÉÏÒ»Ö±ÔÚ×ÁÄ¥Flex,Ïëͨ¹ýDataGrid°ÑMySQLÀïÃæµÄÊý¾Ý¸ø¶Á³öÀ´£¬ÆÚ¼ä³öÏÖÁ˼¸¸öСÎÊÌ⣬¼Ç¼ÏÂ~~
1.µÚÒ»´Î½øÐÐÁ¬½ÓÊý¾Ý·þÎñ(Data-Connect to Data/Service-PHP-Browse)ʱ,»á³öÏÖ°²×°Zend FrameWork,Ñ¡Ôñok,²»ÒªÊºóÔÙÈ¥ÍøÕ¾ÏÂÔØZendAMF,Õâ¸öÀïÃæ»áÉÙһЩ¶«Î÷.
2.Data-Bind to Dataʱ,´ÓÑù±¾Êý¾Ý×Ô¶¯¼ì²âËü¼´¿ÉÅäÖ÷µ»ØÀàÐÍ,Õâʱµ¯³öÁËÒ»¸ö¶Ô»°¿ò,Ò»´ó¶ÑµÄWarning,¶¼ÊÇһЩMysqliµÄº¯Êý,ÀàËÆÓÚWarning: mysqli_connect() expects parameter 5 to be longµÈµÈ,Õâ¿ÉÄÜÊÇÒòΪPHP²»Ö§³ÖmysqliÀ©Õ¹µÄÔµ¹Ê,ÓÃphpinfo()º¯Êý²âÊÔÒ»ÏÂ,Èç¹ûÒ³ÃæûÓгöÏÖmysqli,´ò¿ªPhp.iniÅäÖÃÎļþÈ¥µôextension=php_mysqli.dllÇ°ÃæµÄÒýºÅ¼´¿É.Èç¹ûPHPÒѾ֧³ÖmysqliÀ©Õ¹,¾ÍÊÇÄãµÄPHPÀàÎļþÀïÃæµÄPortÉèÖÃΪ¿ÕÁË,°ÑËü¸ÄΪ3306¾Í¿ÉÒÔÁË,Õâ¸öÊÇMySQLµÄĬÈ϶˿ںÅ..
3.Èç¹û·¢ÏÖÒ»Çв¿ÊðÍê±Ïµ«ÊÇDataGrid»¹ÊDz»ÄÜ°ÑMySQLÀïÃæµÄÊý¾Ý¶Á³öÀ´,²¢ÇÒµ¯³öдÓÐChannel disconnected before an acknowledgement was receivedµÄ¶Ô»°¿ò,ÕâÊÇ´ó¸ÅÊÇ˵Ã÷ÄãµÄPHPÎļþÓÐÎÊÌâ,ÀàËÆÏñÓÐһЩ¿Õ¸ñʲôµÄ,µ±ÎÒ´ò¿ªÎÒµÄPHPÎļþµÄʱºò,ÀïÃæ»áĪÃû³öÏÖһЩÎʺÅ,¶àÊýÊdzöÏÖÔÚ¾äβ»òÕß»»Ðд¦,°ÑÄÇЩÎʺÅɾµô¾Í¿ÉÒÔÁË :)
----------------------------------------------------------------------------------------------------------------------------------------
½ñÌìÌý˵IE9²»»áÖ§³ÖFlash,AdobeÒ²Òò´ËÊܵ½Á˺ܶàÈ˵ÄÅê»÷,»°ËµÎÒÒѾÓпìÁ½Ä겻ʹÓÃIEÁË,ºÇºÇ,Âܲ·°×²Ë¸÷ÓÐËù°®
Ïà¹ØÎĵµ£º
copy F:\php\php5ts.dll F:\Apache2.2\bin\
copy F:\php\libmysql.dll F:\Apache2.2\bin\
copy F:\php\php.ini-recommended F:\php\php.ini
httpd:
LoadModule php5_module "F:\php\php5apache2_2.dll"
PHPIniDir "F:\php\php.ini"
AddType application/x-httpd-php .php
php.ini:
short_open_tag = Off ¸Ä³É sho ......
ÔÚPHP±à³ÌÖÐ, ÎÒÃǾ³£»áÓöµ½Ò»Ð©Ö±½Ó²úÉúÊä³öµÄº¯Êý, Èçpassthru(),readfile(), var_dump() µÈ. µ«ÓÐʱÎÒÃÇÏë°ÑÕâЩº¯ÊýµÄÊä³öµ¼Èëµ½ÎļþÖÐ,»òÕßÏȾ¹ý´¦ÀíÔÙÊä³ö, »òÕß°ÑÕâЩº¯ÊýµÄÊä³ö×÷Ϊ×Ö·û´®À´´¦Àí.
¡¡¡¡ÕâʱÎÒÃǾÍÒªÓõ½ Output Buffer(Êä³ö»º³å) º¯ÊýÁË.
´¦ÀíÊä³ö»º³åµÄº¯ÊýÖ÷ÒªÓÐÕâô¼¸¸ö:
ob_start() ¿ªÊ¼Ê ......
sessionµÄ×÷ÓÃÓòÊÇÔÚÒ»´Î»á»°ÖÐÆð×÷Óã¬ËùÒÔÔÚÒ»´Î»á»°ÖУ¬¿ÉÒÔÓÃSessionÀ´´æ´¢±£´æËùÐèÒªµÄÖµ£¬ÈçʵÏÖ¹ºÎï³µ£¬¿Í»§ÊÇ·ñµÇ¼µÄÑéÖ¤µÈµÈ¡£ÔÚʹÓÃÇ°Ê×ÏÈÒª¿ªÆôsession
<?php
session_start();
?>
¿¼ÂÇÊÇ·ñ¿ÉдÈësession
<?php
if (isset($_POST['userid'])){
$_SESSION[' ......
»ù±¾Ë¼Â·£ºÍ¨¹ýSOCKETÇëÇóÆäËûPHP½Å²½£¬ÊµÏÖPHPµÄ¶à½ø³ÌµÄÒì²½Ö´ÐС£
·Ï»°¾Í²»¶à˵ÁË£¬Çë¿´ÏÂÃæµÄ½Å²½²¢Ö´ÐÐÖ®¡£
<?php
//a.php
function runThread(){
$fp = fsockopen('127.0.0.1', 82, $errno, $errmsg);
fputs($fp, "GET /a.php?act=b\r\n"); //ÕâÀïµÄµÚ¶þ¸ö²ÎÊýÊÇHTTPÐÒéÖй涨µÄÇëÇóÍ·
//²»Ã÷°×µÄÇë¿´RFCÖ ......