About the PHP include page

WBOY
Release: 2016-08-23 09:17:42
Original
1422 people have browsed it

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.

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!