简体   繁体   中英

how to load a php page in html and also a button for pop-up

Describing as example: assume A= www.domain.com/test.html is a page and B = www.domain/php/forum/ is another php running forum .

it is possible to load B on A in somehow ? and also how may I add php forums as a button popup ? php page is on another folder not in the same folder.

please any advise. Thanks

您可以通过 HTML 方式使用 iframe,也可以通过 php 方式通过 cURL 或 file_get_contents 获取页面。

Assuming you changed test.html to test.php you could include the index of you forum.

<?php include 'php/forum/index.php'; ?>

I don't see why you would want to include it all however? Perhaps make a widget that shows some useful information that you want on your homepage and include that?

The easiest way to do what you want to do is to use an iframe to embed one document into another. For the most basic implementation your HTML on www.domain.com/test.html would look like

<iframe src="www.domain/php/forum/"></iframe>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM