GFXVoid Graphic Design Forum

Remove Text Formatting
Loading...

» Online Users: 8,071

0 members and 8,071 guests
No Members online

» Site Navigation

 > FAQ

» Stats

Members: 35,442
Threads: 103,075
Posts: 826,688
Top Poster: cc.RadillacVIII (7,429)
Welcome to our newest member, Lekelindids
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Includes

  1. #1
    Join Date
    Feb 2005
    Location
    Floorboards
    Posts
    823

    Default

    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.

    Code:
    <?php include("page_name_here.php") ?>
    Code:
    <?php require("page_name_here.php") ?>
    Code:
    <?php require_once("page_name_here.php");
    Hope you enjoy!

  2. #2
    Join Date
    Dec 2004
    Location
    Buffalo Grove, Illinois
    Posts
    350

    Default

    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...

  3. #3
    Join Date
    Feb 2005
    Location
    Floorboards
    Posts
    823

    Default

    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.

  4. #4
    Join Date
    Jan 2005
    Location
    Wiltshire.England
    Posts
    6,351

    Default

    Hmm i might have to learn php.. all i know is the most basic html you could do ...


  5. #5
    Join Date
    Feb 2005
    Location
    va
    Posts
    29

    Default

    just remember that what is inside the "" isn't a url it is the path to the file that you want to include

  6. #6
    Join Date
    Jan 2005
    Posts
    377

    Default

    So just replace this with the iFrame tag? Sounds easy enough.

  7. #7
    Join Date
    Mar 2005
    Location
    Insanity Sq.
    Posts
    3,811

    Default

    im confused, what exactly does this do?
    If you want help...
    Screw you
    If you make sigs...
    Screw you

  8. #8
    Join Date
    Mar 2005
    Posts
    219

    Default

    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 &#39;news.php&#39; ?>.. and voila the news page is on with your main page and w/e u have with it

  9. #9
    Join Date
    Jan 2005
    Posts
    377

    Default

    Ah, I got it.

    I might just start using these .

  10. #10
    Join Date
    Mar 2005
    Location
    Insanity Sq.
    Posts
    3,811

    Default

    so these are kinda like iframes? could i like specify dimensions that i want the new document to be in??
    If you want help...
    Screw you
    If you make sigs...
    Screw you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1