你可以使用弹性,让您的本地服务器的IP ..
在Flex使用HttpService的....
import mx.managers.CursorManager;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
public function readIP()
{
networkService = new HTTPService();
networkService.useProxy=false;
networkService.method="POST";
networkService.url = "http://www.something.com//getip.php";
networkService.addEventListener(ResultEvent.RESULT, readResult);
networkService.addEventListener(FaultEvent.FAULT, readFailed);
networkService.send();
CursorManager.setBusyCursor();
}
private function readResult(event: ResultEvent):void
{
//Process Result
CursorManager.removeBusyCursor();
}
private function readFailed(event: FaultEvent):void
{
//Process Failure
}
或者,如果你有在服务器上启用SSI,你可以用它来得到你的文件URI:
The URI of this document is:
甚至更好的文档根目录/ SERVER_ADDR
The Document root of this document is:
The Server Address of this document is: