Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

flashÓëphp½áºÏʵÏÖIP¼°¹éÊôµØ²éѯ

Êý¾Ý¿âÊÇ ´¿ÕæÊý¾Ý¿â ¸ñʽΪ UTF-8  txt¸ñʽ
phpÎļþÊÇUTF-8±àÂë 
demo :      http://dreamnight.gicp.net/zendphp/IP/connect.swf
flash¶Ë£º
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.ProgressEvent;
//import flash.text.TextFormat
//flash.system.System.useCodePage=true;//
var myIP:String;
var myPlace:String;
var loader:URLLoader= new URLLoader();
var id=getTimer();
var url:String = " http://dreamnight.gicp.net/zendphp/IP/ipTest.php";
var urlRequest:URLRequest = new URLRequest(url+"?id="+id);
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
loader.load(urlRequest);
loader.addEventListener(Event.COMPLETE,handle);
loader.addEventListener(ProgressEvent.PROGRESS,onProgress);
//var format:TextFormat= new TextFormat();
//format.font="ËÎÌå";
//showText.defaultTextFormat=format;
function handle(e:Event):void{
 trace("¼ÓÔØÍê³É");
 var phpData:*=e.target.data;
 trace(phpData);
 myIP=String(phpData.ip);
 trace(myIP);
 myPlace=String(phpData.area);
 trace(myPlace);
 showText.text="ÄúËùÔÚµÄλÖÃÊÇ"+myPlace+"\nÄúµÄIPµØÖ·ÊÇ"+myIP;
 
 
 
 //ÊÍ·ÅÄÚ´æ
 loader.removeEventListener(Event.COMPLETE,handle);
 loader.removeEventListener(ProgressEvent.PROGRESS,onProgress);
 url="";
 urlRequest=null;
 loader=null;
 }
 
 function onProgress(e:ProgressEvent):void{
  var percent:int=int(e.bytesLoaded*100/e.bytesTotal);
  showText.text="ÒѾ­¼ÓÔØ"+percent+"%";
  }
php¶Ë£ºÂ·¾¶ÊÇ £º http://dreamnight.gicp.net/zendphp/IP/ipTest.php
<?php
//header("Content-Type:text/html;charset=gb2312");
//$getIP="111.176.149.35"; // ÕâÀïÊÇ×Ô¼ºËæ±ãдµÄÒ»¸öip  ʵ¼ÊʱÄ㻹Ҫͨ¹ý³ÌÐòµÃµ½Õâ¸öip
$getIP="³õʼIP";
$getIP=getIP();
//µÃµ½µ±Ç°Ä¿Â¼
$PHP_SELF=$_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
$dir='http://'.$


Ïà¹ØÎĵµ£º

phpÖÐpear°²×°³öÏÖ´íÎó

      ×î½üÏë°²×°PEAR(PHP Extension and Application Repository),µ«ÊÇÔÚÖ´ÐÐÅú´¦ÀíÎļþgo-pear.batµÄʱºò³öÏÖÁË´íÎó£º
phar "C:\php\PEAR\go-pear.phar" does not have a signature
PHP Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: phar error: ......

PHPÖжàάÊý×éµÄÅÅÐò

1.Óû§¶¨ÒåÅÅÐò£ºusort($array, functionName);ÆäÖÐfunctionNameΪÓû§¶¨ÒåµÄº¯ÊýÃû£¬Óû§¶¨ÒåµÄº¯ÊýÖ¸¶¨ÅÅÐò¹æÔò£¬±È½ÏÊý×éÖÐÁ½¸öÔªËصĴóС£¬´óÓÚ·µ»ØÕýÊý£¬Ð¡ÓÚ·µ»Ø¸ºÊý£¬µÈÓÚ·µ»Ø0¡£2.·´ÏòÓû§ÅÅÐò£ºÓû§¶¨Ò庯Êýʱ£¬±È½ÏÊý×éÖÐÁ½¸öÔªËصĴóС£¬´óÓÚ·µ»Ø¸ºÊý£¬Ð¡ÓÚ·µ»ØÕýÊý£¬µÈÓÚ·µ»Ø0¡£$fruits = array(array('APP', ' ......

³£ÓÃʱ¼ä¸ñʽÓëPHPʱ¼ä¸ñʽÏ໥ת»»

ÎÄ/Fenying
 
¡¡¡¡ÀýÈçÓг£ÓÃʱ¼ä¸ñʽ yyyy-mm-dd HH:ii:ss£¬ÈçºÎת»»³ÉPHPÖÐdateº¯Êý¿ÉʹÓõÄʱ¼ä¸ñʽÄØ£¿
¡¡¡¡Ê¹ÓàPHPTimeFormatfromCommon() ¿ÉÒÔ°ÑͨÓÃʱ¼ä¸ñʽת»»³ÉPHPʱ¼ä¸ñʽ
¡¡¡¡¡¡¡¡PHPTimeFormatfromCommon('yyyy-mm-dd HH:ii:ss') => 'Y-m-d H:i:s'
¡¡¡¡Ê¹Óà PHPTimeFormatToCommon() ¿ÉÒÔ° ......

ÓÅ»¯PHP´úÂëµÄ42Ìõ½¨Òé

1.Èç¹ûÒ»¸ö·½·¨¿É¾²Ì¬»¯£¬¾Í¶ÔËü×ö¾²Ì¬ÉùÃ÷¡£ËÙÂÊ¿ÉÌáÉýÖÁ4±¶¡£
2.echo ±È print ¿ì¡£
3.ʹÓÃechoµÄ¶àÖزÎÊý£¨Òë×¢£ºÖ¸ÓöººÅ¶ø²»ÊǾäµã£©´úÌæ×Ö·û´®Á¬½Ó¡£
4.ÔÚÖ´ÐÐforÑ­»·Ö®Ç°È·¶¨×î´óÑ­»·Êý£¬²»ÒªÃ¿Ñ­»·Ò»´Î¶¼¼ÆËã×î´óÖµ¡£
5.×¢ÏúÄÇЩ²»ÓõıäÁ¿ÓÈÆäÊÇ´óÊý×飬ÒÔ±ãÊÍ·ÅÄÚ´æ¡£
6.¾¡Á¿±ÜÃâʹÓÃ__get£¬__set£¬__autolo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ