PHP - Breaking Frame

Is there a way to break out of a frame using PHP? I did it using JavaScript, but I would rather use PHP instead. Thank.

+2


source to share


2 answers


Frames are a client side issue. Javascript is the solution because it is a client side scripting language that is view context aware. Frames don't make sense on the server side.



Thus, only client code can do this. Not PHP.

+7


source


PHP is server side. It just generates HTML for the page. So there is no way to determine if its output will be displayed in the frame.



Best PHP can do the Javascript code output for you to exit the frame.

+1


source







All Articles