GetDotted Domains

Viewing Thread:
"The PHP Include tag"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Tue 12/02/02 at 22:29
Regular
Posts: 787
Hiya. You know that PHP Include tag? Well, how does it work? I can do it so that it references a seperate file, but can I give it a name and a URL like 'www.mysite.com/myfile.php?referencedid=data'. Do you know what i mean, or am I just jibba jabbering about?
Tue 12/02/02 at 23:57
Regular
"Pouch Ape"
Posts: 14,499
Nah, that's not what I meant. I know how to do all that, foo!

What I mean is, you know the way you can target an input box by using '?id=whatever' in the URL, can you do this with the PHP include thingy?

e.g.

I have a file called 'index.php' and a link inside that calls the 'index.php' file, but gives the include function a different file to reference.

Do you get what I mean yet?
Tue 12/02/02 at 22:38
Regular
"Eff, you see, kay?"
Posts: 14,156

include("file.foo");

?>

or...


include("$referenced");

?>

It's dead easy. It will also parse any PHP code inside the file that is enclosed in in

NOTE:

You can't do include("file.php?foo=bar");, you just need to set the variable with $foo = "bar"; before you call include();.

Also note that this IS different to require();. For more information, RTFM:

http://www.php.net/manual/en/function.include.php
Tue 12/02/02 at 22:29
Regular
"Pouch Ape"
Posts: 14,499
Hiya. You know that PHP Include tag? Well, how does it work? I can do it so that it references a seperate file, but can I give it a name and a URL like 'www.mysite.com/myfile.php?referencedid=data'. Do you know what i mean, or am I just jibba jabbering about?

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Continue this excellent work...
Brilliant! As usual the careful and intuitive production that Freeola puts into everything it sets out to do, I am delighted.
Brilliant service.
Love it, love it, love it!
Christopher

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.