| Author |
include page content
|
egbai mmumene
Ranch Hand
Joined: Sep 18, 2012
Posts: 30
|
|
|
hi, i saw a tutorial snippet about including pages into a default index page. but what i dont understand is how i can get the content from the include page, as in should i call a method from that page? if so what of other pages using that same index would they use the same method name? please help really confused.
|
 |
K. Tsang
Ranch Hand
Joined: Sep 13, 2007
Posts: 1222
|
|
In PHP, there is a "include" function. http://www.php.net/manual/en/function.include.php
Once a php page is included, you can access the variables and methods in that page. When using include, you should also want to know about "require" function.
|
K. Tsang JavaRanch SCJP5 SCJD/OCM-JD
|
 |
egbai mmumene
Ranch Hand
Joined: Sep 18, 2012
Posts: 30
|
|
|
then how do i display the content of the included file. is it through return methods or what.
|
 |
K. Tsang
Ranch Hand
Joined: Sep 13, 2007
Posts: 1222
|
|
egbai mmumene wrote:then how do i display the content of the included file. is it through return methods or what.
The link provided shows some examples. Please check it out first. Basically once a page is include, those methods and variables become local (on the same page).
|
 |
 |
|
|
subject: include page content
|
|
|