public function behaviors()
{
return [
'basicAuth' => [
'class' => HttpBasicAuth::class,
'auth' => function ($username, $password) {
return User::findOne([ 'email' => $username, 'password' => $password ]);
}
],
];
}
<?php
$id = 1488;
?>
<h1>this is page with iframe</h1>
<iframe src="/test.php?id=<?=$id?>" frameborder="0" width="500px" style="border:2px solid black;"></iframe>
---
<?php
var_dump($_GET);
?>
this is inside iframe page