Page 1 of 1
have index.php load another file?
Posted: Sat 26 Feb 2011 3:52 pm
by n9mfk
Hi all,
im look for a easy to have index.php load another file
i have a file called test.php i know i could copy what in test.php into index.php i do not went to do that thanks for any idea
Re: have index.php load another file?
Posted: Sat 26 Feb 2011 4:11 pm
by daj
within index.php
You can also use 'require' which is the same as include, but stops executing if it can not load/find the extra file.
I usually always use
which is a little more advanced but does the same job -- it just does not re-include the file if it has been included elsewhere in the script.
your test.php file needs to include PHP tags too....
Re: have index.php load another file?
Posted: Sat 26 Feb 2011 10:10 pm
by gemini06720
Beau, you might want to have a look at the
W3Schools Online Web Tutorials, a great site with a lot of easy to understand information, tutorials, references, and examples...

Re: have index.php load another file?
Posted: Sat 26 Feb 2011 10:13 pm
by daj
Indeed -- it's a brilliant site to learn from
Re: have index.php load another file?
Posted: Sat 26 Feb 2011 10:40 pm
by Gina
Yes, I've learnt a lot from that sight

Re: have index.php load another file?
Posted: Sun 27 Feb 2011 12:14 am
by n9mfk
That for all te great tips
Beau
Re: have index.php load another file?
Posted: Sun 27 Feb 2011 12:26 am
by gemini06720
Gina wrote:Yes, I've learnt a lot from that sight

Gina, you really mean "that sight"...

Re: have index.php load another file?
Posted: Sun 27 Feb 2011 1:06 am
by Gina
gemini06720 wrote:Gina wrote:Yes, I've learnt a lot from that sight

Gina, you really mean "that sight"...

Ooops! "site" is what I meant

A senior moment there

Re: have index.php load another file?
Posted: Sun 27 Feb 2011 2:05 am
by gemini06720
Gina wrote:Ooops! "site" is what I meant

A senior moment there

Senior!

But, but... Gina you do not look a day over [fill the blank]...
