Home  >  Article  >  Backend Development  >  About the PHP include page

About the PHP include page

WBOY
WBOYOriginal
2016-08-23 09:17:421458browse

I have a page a.php, and then put b.php in it. Use the following statement . Now there is dynamic content in b.php, for example, I want to read it from the database. How can we achieve this layout by taking a record and displaying it?

I know it can be achieved using ajax in b.php, but besides this method, is there any other way?

Thank you all heroes!

Reply content:

I have a page a.php, and then put b.php in it. Use the following statement . Now there is dynamic content in b.php, for example, I want to read it from the database. How can we achieve this layout by taking a record and displaying it?

I know it can be achieved using ajax in b.php, but besides this method, is there any other way?

Thank you all heroes!

Use the return statement in b.php to return the record read from the database, and then use <?php $list = include 'b.php';?> on the a.php page to obtain this record; finally, in Just display this $list on the page.
In addition, your intention is unclear, and I don’t know if you want to implement this function.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn