PHP “header (location)” inside IFRAME, to load in _top location?

前端 未结 8 1765
名媛妹妹
名媛妹妹 2020-12-03 10:20

I have a simple form which is inside IFRAME. When user click on SUBMIT, it redirects to a specific page on my server. The function I use for the redirect is



        
8条回答
  •  失恋的感觉
    2020-12-03 10:49

    For CakePHP 4, to redirect your parent page just add option 'target'=>'_top' in your iframe's link:

    Example:

     Html->link(__('Redirect Parent'), ['controller' => 'Users', 'action' => 'view'], ['target'=>'_top']) ?>
    

    All the best!

提交回复
热议问题