FlashʹÓÃAMFÓëPHPͨÐÅ - PHP / ¿ªÔ´×ÊÔ´
FlashʹÓÃAMFÓëPHPͨÐÅ
2009Äê04ÔÂ15ÈÕ 08:27 P.M.
1, ÏÂÔØ amfphp ¼°ÆäʾÀý´úÂë : http://www.amfphp.org/
2, amfºËÐÄ·ÅwebĿ¼,ʾÀý´úÂëÖÐµÄ services ·ÅºËÐĶÔӦĿ¼ÏÂ
3, ÐÞ¸Ä Main.as µÄ gateway:String = "http://localhost/amfphp/gateway.php" Ö¸Ïò web Ŀ¼
4, ÐÞÕý: ºËÐÄÖÐĬÈÏ´ò¿ªÁËsession,²»Òª¾Íɾµôsession_start()
Èç¹ûÊý¾Ý¿âÊÇUTF-8±àÂë,gateway.phpÖеıàÂëÉ趨: $gateway->setCharsetHandler("none", "ISO-8859-1", "ISO-8859-1");
×÷Ϊ¼ÓËÙ,¿É¼ÓÔØAMFEXTÀ©Õ¹,ʹ·þÎñÆ÷Ö§³ÖAMF¸ñʽµÄ±à/½âÂë:
http://www.teslacore.it/wiki/index.php?title=AMFEXT
Linuxϵݲװ:
sh# tar -zxvf amfext*.tgz
sh# cd amfext*
sh# phpize
sh# ./configure
sh# make
sh# make install
½«ÌáʾÔÚÏàӦĿ¼ÏÂÉú³ÉÁË: amf.so Îļþ
¿½±´ÖÁÀ©Õ¹Ä¿Â¼,²¢ÔÚphp.iniÎļþϼÓÈë:
extension=amf.so
ÖØÆôapache
gateway.phpÉèÖÃ:
$gateway->setCharsetHandler("none", "ISO-8859-1", "ISO-8859-1"); //Êý¾Ý¿âUTF-8±àÂëʱµ÷Õâ¸ö
$gateway->logIncomingMessages('./in/'); //µ÷ÊÔÓÃ.flash´«µÝ¹ýÀ´µÄ²ÎÊý¶¼»á±£´æµ½´ËĿ¼ÏÂ,ͨ¹ý$HTTP_RAW_POST_DATA»òphp://input»ñÈ¡
$gateway->logOutgoingMessages('./out/'); //µ÷ÊÔÓÃ.·µ»Ø¸øflashµÄÊý¾Ý¶¼»á±£´æµ½´ËĿ¼ÏÂ
$gateway->disableNativeExtension(); //½ûÓ÷þÎñÆ÷amfÀ©Õ¹,Èç¹û¼ÓÔØÁËamfextÀ©Õ¹,ÓÉÓÚ´ËÀ©Õ¹ÓÐȱÏÝ,¾ÍÓ¦¸Ãµ÷ÓÃÕâ¸ö
$gateway-&
Ïà¹ØÎÊ´ð£º
ÇëÎÊÏÂÄܲ»ÄÜÔÙwindows϶¨ÆÚÇå¿ÕmysqlÒ»¸ö±íÖеÄÈ«²¿Êý¾Ý£¬ÓÃPHPʵÏÖ£¡
лл¸÷λÁË
¾Í±ÈÈçÒ»¸öÐÇÆÚÇå¿ÕÒ»´Î
±ÈÈçÿ¸öÐÇÆÚÁùÁãµãÇå¿ÕÒ»´Î£¡
ллÁË
¼Æ»®ÈÎÎñ...php....sql...truncate....OK
Äã¾ÍÕâ½ÓÔÚҳà ......
ÎÒÔÚ¿ª·¢¹ý³ÌÖÐÓöµ½ÕâÑùÒ»¸ö²¿Ìâ,ÏÂÃæÊÇÒ»¸öjsÎļþ,ÅäÖõÄÊÇÒ»¸öflash,µ«Êǵ±ÎÒÔÚÓÃÒ»¸öhtmlÒ³ÃæÏÔʾµÄʱºò,·¢ÏÖÕâ¸öhtmlÎļþ±ØÐëºÍÕâ¸öjsÎļþÔÚͬһ¸öÎļþ¼ÐÏÂ,·ñÔò¾ÍÎÞ·¨ÏÔʾ,µ«ÊÇÎÒµÄhtmlÒ³ÃæºÍ´æjs µÄµØ·½¶¼ÊÇ· ......
²ËÄñÇó¾È£¡£¡
ÏÖÔÚÎÒÊÖÍ·ÓÐÒ»¸öphp+oracleµÄÍøÕ¾¡£¡£·þÎñÆ÷ÊÇlinuxϵͳ
Çë¸÷λ¸æËßÎÒÈçºÎ·¢²¼¡£¡£¡£ÎÒÊÇÐÂÊÖ¡£Ð»Ð»ÁË£¡£¡
°²×°Ò»¸öapache£¬°ÑphpÎļþ·Åµ½apacheµÄ·¢²¼Ä¿Â¼Ï£¬ ......
¾ÍÊÇÎÒÔÚij¸öÍøÒ³²åÈëÁËÒ»¸öphpÁ´½Ó
ÎÒÏë»ñµÃÄǸöÍøÖ·µØÖ·µØÖ·À¸µÄurl¶øÇÒÒªÊä³ötxt¸ñʽ»òÆäËû¸ñʽ¡£Ó¦¸ÃÈçºÎʵÏÖ£¿£¿£¿
»¹ÓоÍÊÇдÈëµ½.txt ÎļþÀÔõôȥÅжÏÊÇ·ñÖظ´¡£
$_sever[request_uri]
Â¥Ö÷¸øµã·Ö ......