• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

include page content

 
egbai mmumene
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 3406
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
egbai mmumene
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then how do i display the content of the included file. is it through return methods or what.
 
K. Tsang
Bartender
Posts: 3406
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic