Insert file html

Discussion in 'HTML' started by Alistair George, Jul 10, 2007.

  1. Hi.
    I realise I can make a page .php and include a file thusly:
    <?php include("thehomebooked.html"); ?>
    But this method makes the file appear at the top of the current page,
    when I wanted it below all the buttons and so on at the top.
    Is there an alternative, or better way to insert a file into preferably
    an html page?
    Thanks,
    Alistair.
    Alistair George, Jul 10, 2007
    #1
    1. Advertising

  2. Alistair George wrote:
    > Hi.
    > I realise I can make a page .php and include a file thusly:
    ><?php include("thehomebooked.html"); ?>
    > But this method makes the file appear at the top of the current page,
    > when I wanted it below all the buttons and so on at the top.
    > Is there an alternative, or better way to insert a file into preferably
    > an html page?


    Move that code lower in the page?

    --
    Blinky RLU 297263
    Killing all posts from Google Groups
    The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
    Blinky the Shark, Jul 10, 2007
    #2
    1. Advertising

  3. Alistair George

    dorayme Guest

    In article <>,
    Alistair George <> wrote:

    > Hi.
    > I realise I can make a page .php and include a file thusly:
    > <?php include("thehomebooked.html"); ?>
    > But this method makes the file appear at the top of the current page,
    > when I wanted it below all the buttons and so on at the top.
    > Is there an alternative, or better way to insert a file into preferably
    > an html page?
    > Thanks,
    > Alistair.


    Put your include exactly where you want it to be in the html. I
    put my footer includes right at the bottom and my css does not
    tell the footer to go anywhere but the bottom. I will put it
    another way. When you put in the include, imagine you are putting
    in the actual included text. Where the text would go, put the
    include instruction (which basically is just a "please, php
    engine, go fetch the following text and stick it in here - and I
    mean literally here")

    --
    dorayme
    dorayme, Jul 10, 2007
    #3
  4. dorayme wrote:
    > In article <>,
    > Alistair George <> wrote:
    >
    >> Hi.
    >> I realise I can make a page .php and include a file thusly:
    >> <?php include("thehomebooked.html"); ?>
    >> But this method makes the file appear at the top of the current page,
    >> when I wanted it below all the buttons and so on at the top.
    >> Is there an alternative, or better way to insert a file into preferably
    >> an html page?
    >> Thanks,
    >> Alistair.

    >
    > Put your include exactly where you want it to be in the html. I
    > put my footer includes right at the bottom and my css does not
    > tell the footer to go anywhere but the bottom. I will put it
    > another way. When you put in the include, imagine you are putting
    > in the actual included text. Where the text would go, put the
    > include instruction (which basically is just a "please, php
    > engine, go fetch the following text and stick it in here - and I
    > mean literally here")
    >

    OK sounds good but I'm using WYSIWYG editor. A really nice editor, but
    its not html so you can only go to the page properties and edit the html
    there. Unfortunately, does not matter where you put the php script, it
    still overwrites the original page.
    Alistair George, Jul 10, 2007
    #4
  5. Alistair George

    mbstevens Guest

    On Tue, 10 Jul 2007 15:45:42 +1200, Alistair George wrote:
    > OK sounds good but I'm using WYSIWYG editor. A really nice editor, but
    > its not html so you can only go to the page properties and edit the html
    > there. Unfortunately, does not matter where you put the php script, it
    > still overwrites the original page.


    That is not a really nice editor, no matter what you paid for it.
    A free editor will download in minutes.
    mbstevens, Jul 10, 2007
    #5
  6. Alistair George

    dorayme Guest

    In article <>,
    Alistair George <> wrote:

    > dorayme wrote:
    > > In article <>,
    > > Alistair George <> wrote:
    > >
    > >> Hi.
    > >> I realise I can make a page .php and include a file thusly:
    > >> <?php include("thehomebooked.html"); ?>
    > >> But this method makes the file appear at the top of the current page,
    > >> when I wanted it below all the buttons and so on at the top.
    > >> Is there an alternative, or better way to insert a file into preferably
    > >> an html page?
    > >> Thanks,
    > >> Alistair.

    > >
    > > Put your include exactly where you want it to be in the html. I
    > > put my footer includes right at the bottom and my css does not
    > > tell the footer to go anywhere but the bottom. I will put it
    > > another way. When you put in the include, imagine you are putting
    > > in the actual included text. Where the text would go, put the
    > > include instruction (which basically is just a "please, php
    > > engine, go fetch the following text and stick it in here - and I
    > > mean literally here")
    > >

    > OK sounds good but I'm using WYSIWYG editor. A really nice editor, but
    > its not html so you can only go to the page properties and edit the html
    > there. Unfortunately, does not matter where you put the php script, it
    > still overwrites the original page.


    I don't know what you are doing then, sorry. All i can suggest is
    this. Don't call the includes .html, they are just text files,
    no? And, if you must, write your main html in your program and
    open the resulting file in any plain text editor (not a WSIWIG
    anything). And manually type in or paste the include instruction
    as suggested above. Use .txt or .inc, it does not really matter
    to name the includes. The includes instruction will cause the php
    engine on the server to fetch the text file and stick it in palce
    of the instruction... Best I can do here?

    --
    dorayme
    dorayme, Jul 10, 2007
    #6
  7. Alistair George

    John Hosking Guest

    Alistair George wrote:
    > dorayme wrote:
    >> In article <>,
    >> Alistair George <> wrote:
    >>
    >>> I realise I can make a page .php and include a file thusly:
    >>> <?php include("thehomebooked.html"); ?>
    >>> But this method makes the file appear at the top of the current page,
    >>> when I wanted it below all the buttons and so on at the top.

    >>
    >> Put your include exactly where you want it to be in the html. [...]
    >>

    > OK sounds good but I'm using WYSIWYG editor.


    By which you mean to say you're using a WYSINWYG editor.

    > A really nice editor,


    Except for the part that makes it unusable.

    > but its not html so you can only go to the page
    > properties and edit the html there.


    If you can't actually modify the HTML, then it is absolutely not a
    useful tool for producing HTML.

    > Unfortunately, does not matter where you put the php script, it
    > still overwrites the original page.


    Time to upgrade to a more advanced editing tool, like Notepad.

    --
    John
    Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html
    John Hosking, Jul 10, 2007
    #7
  8. >
    > Time to upgrade to a more advanced editing tool, like Notepad.
    >

    Purist answers ;-)

    I have learnt several programming languages and I just want to get a few
    pages on the web without going through the learning process again, hence
    using a WYSIWYG tool which generally I find pretty good.

    Nevertheless I understand where you are coming from and appreciate your
    suggestions.
    When I need to use a html editor I have been using NVU.
    Alistair.
    Alistair George, Jul 10, 2007
    #8
  9. Alistair George wrote:
    >>
    >> Time to upgrade to a more advanced editing tool, like Notepad.
    >>

    > Purist answers ;-)


    Well, the hip-slick-and-cool tool wasn't working very well. :)


    --
    Blinky RLU 297263
    Killing all posts from Google Groups
    The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
    Blinky the Shark, Jul 10, 2007
    #9
  10. Scripsit Alistair George:

    > I have learnt several programming languages


    So what? HTML isn't a programming language. PHP is, but PHP doesn't seem to
    be your problem here.

    > and I just want to get a
    > few pages on the web without going through the learning process
    > again,


    Then ask someone to do the job for you.

    > hence using a WYSIWYG tool which generally I find pretty good.


    You seem to have said that it has an essential problem that cannot be
    circumvented.

    > When I need to use a html editor I have been using NVU.


    That's fine I guess. But I'm afraid NVU generates code that puts IE into
    Quirks Mode. You can fix this using Notepad, though.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jul 10, 2007
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    12,118
    Beauregard T. Shagnasty
    Jan 10, 2006
  2. cannontrodder
    Replies:
    1
    Views:
    706
    cannontrodder
    Jul 25, 2006
  3. Replies:
    1
    Views:
    433
  4. mcnewsxp

    insert html into html

    mcnewsxp, Mar 30, 2010, in forum: HTML
    Replies:
    24
    Views:
    4,380
    cipherd
    Jan 7, 2012
  5. Giovanni Azua
    Replies:
    1
    Views:
    162
    Sudrien
    Jul 16, 2007
Loading...

Share This Page