Here's a basic PHP tag no one seems to use! Includes allow you to embed the source of another php page into one section of your main page. Like so.
I use this all the time. It's really important in the stuff I program.
Anyways, I edited it up a bit to show different types of includes. Enjoy...
02-23-2005, 06:54 AM
weasel
Uhm, "require" and "require_once" are usually used not as includes. They can be, but I use them for grabbing code from my index so I can do str_replaces in my CMS that I'm working on.
02-23-2005, 04:39 PM
Dale
Hmm i might have to learn php.. all i know is the most basic html you could do ...
02-24-2005, 05:44 AM
tfc_generalKMK
just remember that what is inside the "" isn't a url it is the path to the file that you want to include
03-22-2005, 07:45 PM
pbguy434
So just replace this with the iFrame tag? Sounds easy enough.
03-22-2005, 10:55 PM
Illegalx17
im confused, what exactly does this do?
03-24-2005, 11:56 PM
Immortal
Its to basically add a document/page to the one your on..
so lets say u have a main page (nicked main.php) and on that page u wanted to add to it news.. which is News.php... on the main page u would add <? include 'news.php' ?>.. and voila the news page is on with your main page and w/e u have with it
03-25-2005, 09:20 AM
pbguy434
Ah, I got it.
I might just start using these ;) .
03-25-2005, 09:25 AM
Illegalx17
so these are kinda like iframes? could i like specify dimensions that i want the new document to be in??