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-&
Ïà¹ØÎÊ´ð£º
Ôڲɼ¯Ò»¸öÒ³ÃæµÄʱºòͨ³£¶¼ÊÇʹÓÃfile_get_contents($url)
²»¹ý·µ»ØµÄ½á¹ûÓÐʱºò»á²»È«
Èç¹ûÔÚhtmlÖÐʹÓà document.ready,ÔÚÒ³Ãæ×¼±¸ºÃºó£¬Ê¹ÓÃajax¶ÁÈ¡±ðÒ»²¿·ÖµÄÊý¾Ý
ÔÙͨ¹ýÐÞ¸Ähtml±êÇ©µÄÄÚÈÝ£¬¾Í²¿·ÖµÄÊý¾Ý¾ ......
index.phpÄÚÈÝ£º
$smarty->assign('name',strtotime('-0'));
$smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......
Çë¸ßÊÖÃǸø½éÉܼ¸±¾ºÃÊ飡
ÊÖ²áºÜÖØÒªµÄàÞ£¡~
ÎÒ¶¼ÊÇÐÂÊÖ Ò»Æë¼ÓÓÍ
Ò»°ã¶¼ÊÇÊÖ²áµÄÀ²£¬ÔÙ¼ÓÉÏÒ»±¾ÊµÀý½²½â
php´ÓÈëÃŵ½¾«Í¨ Õâ±¾ÊéÀïÓкöà´íµÄµØ·½¡£
È¥ÂòÊ¥¾°É£¬ÄDZ¾Ê黹²»´í£¬ÁíÍâÄǸö18.8MµÄÊÖ²áÒ ......
Fatal error: Call to undefined function language_attributes() in C:\xampp\htdocs\header.php on line 2
´íÎóÖÐ˵µÄ·½·¨Ã»Óж¨Òå ÊÇʲôÔÒò£¿
php¸ßÊÖÃÇÄÜ°ï°ïÎÒÂð£¿
ÓпÉÄÜÄãËùÓõÄÒ»¸ö·½·¨»òÕßÊôÐÔÊÇÊôÓÚ ......
PHPÀïÃ棬ÎÒµÄ±íµ¥Ã»ÓÐÌîдֵ£¬Ò²Ã»ÓÐÌá½»£¬ÕÕÀí˵isset²»³öÓÐÖµ¡£
ÎÒдµÄisset²éµ½ÓÐÖµ£¬µ«ÊÇechoһϣ¬¾ÍNotice: Undefined index: page in ÁË¡¡Ôõô»ØÊ°¡£¿
if(isset($_POST['page']))
{
echo $_POST['pa ......