2010-02-17 27 views
0

是否可以將嵌入式IFRAME中的SESSION變量傳遞給父頁面?如何將IFRAME SESSION傳遞給父頁面?

含義:

<form> 

<iframe> 
upload image to fake AJAX. 
With PHP, set $_SESSION to be the location of the temporary uploaded photo 
</iframe> 

<input type="submit" /> // will this form submit have the $_SESSION variable set from the IFRAME? 

</form> 

回答

0

PHP會話,在默認情況下,使用Cookie(這是每個域)實現的。

你不需要做任何明確的事情來在不同的框架之間分享它們(除了保持它們在同一個域上)。

+0

所以,你說的是,這將工作。我應該注意哪些安全問題? – JohnJon

+0

超出通常的範圍。 – Quentin