php检查通过iframe打开

I want to check using php if the current page is called by an iframe and not directly in the browser.

It's a page that gets some $_POST parameters while the sending form's target is an iframe, so the page will display in an iframe.

I want to check that using PHP, How?

Thanks.

You can use the SERVER HTTP_REFERER

$_SERVER['HTTP_REFERER'];

You can't. PHP runs serverside. It is for all intents and purposes the same thing as the webserver -- it sees HTTP requests and returns responses. An iframe is a clientside mechanism implemented by the browser that simply allows you to display 2 or more html pages (the response payload).