Display iframe url path in main url

Hello Everyone,
Actually, I was working on a PHP project, so in that, I am using iframe, now I want to ask questions that How I can display iframe URL paths or subpages in the main URL.

For eg: the iframe URL is https://example.com/test.php and embedded this in page suing iframe tag in this domain iframe.com.
So now my main motto is to display that /test.php with an iframe link like this iframe/test.php. And of course, the content will same as displayed in the iframe for that page.

Regards,
tixes