你可以使用彈性,讓您的本地服務器的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
}
同時請參閱[獲取客戶端的IP地址與一個RemoteObject呼叫] http://cookbooks.adobe.com/index.cfm?event=showdetails&postId=3462
或者,如果你有在服務器上啓用SSI,你可以用它來得到你的文件URI:
The URI of this document is: <!--#echo var="DOCUMENT_URI" -->
甚至更好的文檔根目錄/ SERVER_ADDR
The Document root of this document is: <!--#echo var="DOCUMENT_ROOT" -->
The Server Address of this document is: <!--#echo var="SERVER_ADDR" -->
有關更多選項,請檢查: http://www.ssi-developer.net/ssi/ssi-echo.shtml
你是如何執行重定向? – Quentin 2011-04-28 06:37:56