includes file

Discussion in 'HTML & Website Design' started by johny2000, Apr 1, 2009.

  1. #1
    Hi everyone
    I am trying to make an includes file for my website www.askyourcook.com.
    I do not know a thing about doing this and am looking for help .I am a rookie
    but will to learn new things .Can someone walk me though this please
    Thank
     
    johny2000, Apr 1, 2009 IP
  2. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use php:

    <?php
    $myFile = "filelocation"; //
    $var = fopen($myFile, 'r');
    $variabletocallinhtml = fread($var, filesize($myFile));
    fclose($var);
    ?>

    then just call the variable $variabletocallinhtml in the area of the website.
     
    Oxi, Apr 1, 2009 IP
  3. terek

    terek Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    1st way:
    <!--#include virtual="/somefolder/somefile.htm" -->

    2nd way:
    <?php
    include_once("somefolder/somefile.inc");
    ?>
     
    terek, Apr 2, 2009 IP