Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    Hi there! I'm pretty much a novice web design, lol. Naturally I'm having a lot of trouble with frontpage's include webbot (aka U-include). I'm not sure if I'm understanding it right.

    I'm under the impression that I can use U-include to create a portion of my site once and then just attach the portion (say, top.html, onto all my pages. When I want to change this portion up, I go to the original U-Include file (top.html), make the changes there and have the changes show up on every page that carries the U-include webbot. In theory.

    The problem is that, each and every time, the U-include bots are changing into HTML text!!! So it's defeating their purpose. What am I doing wrong? It's driving me crazy! Please help.

    Thanks in advance!!!

    AG

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Sorry to say, but that is a fault with frontpage... I believe your hosting provider has to have frontpage extensions installed and enabled for those to work... I'll have to check but I don't think I even have frontpage extensions as an option on my servers...

    That being said... Simple includes using asp, asp.net or php are a better option all around.

    They just display your code as you write it... Frontpage always had a bad habit of re-writing code it didn't like...

  4. #3
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    Quote Originally Posted by Webzarus, post: 232330
    Sorry to say, but that is a fault with frontpage... I believe your hosting provider has to have frontpage extensions installed and enabled for those to work... I'll have to check but I don't think I even have frontpage extensions as an option on my servers...

    That being said... Simple includes using asp, asp.net or php are a better option all around.

    They just display your code as you write it... Frontpage always had a bad habit of re-writing code it didn't like...
    Thanks for the reply and sorry for my late response. How would I set up an php include? Should I create a normal html include file (i only have frontpage - hope to get dreamweaver soon) and then copy/paste onto a txt editor where I can save the file with a php extension? Or is there a simpler/direct way?

    Any thoughts are welcomed! Thanks, again.

  5. #4
    WDF Staff m3n0tu18's Avatar
    Join Date
    Jul 2011
    Location
    Devon, UK
    Posts
    1,473
    Member #
    28473
    Liked
    265 times
    Moved to correct Forum -m3
    If you like my comments to your thread please click the LIKE button

    Check out my portfolio: Here!
    View my company Facebook Page
    View my company Website

    <<Plrease ignoer my typo's I have isdexlyia>>

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    @acegreen

    To use PHP, you need to change your file extension from .html to .php

    So, your main page would be "index.php"

    Once you do that, you can include any file you choose.

    Put this where it should appear ...

    <?php include("top.html");?>

    But you may want to also change "top.html" to "top.php",
    because within top.php you might be using some PHP scripting.

    So ...

    <?php include("top.php");?>

    ================================

    Frontpage? Not much I can say about that. You're basically screwed.
    You'll never accomplish what you think should happen. It's horrible.
    Good luck.
    m3n0tu18 likes this.


  7. #6
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Quote Originally Posted by mlseim, post: 233122
    @acegreen

    To use PHP, you need to change your file extension from .html to .php

    So, your main page would be "index.php"

    Once you do that, you can include any file you choose.

    Put this where it should appear ...

    <?php include("top.html");?>

    But you may want to also change "top.html" to "top.php",
    because within top.php you might be using some PHP scripting.

    So ...

    <?php include("top.php");?>

    ================================

    Frontpage? Not much I can say about that. You're basically screwed.
    You'll never accomplish what you think should happen. It's horrible.
    Good luck.
    Yup, pretty much what he said...

    I don't know if frontpage will let you do most of this stuff without trying to re-write everything for you...

  8. #7
    Member
    Join Date
    Mar 2012
    Posts
    50
    Member #
    31189
    Meant to reply sooner...but didn't get a chance. I understand if my make my main pages into php I can then include any file (html, php, js, etc). But I have a question as far as the php include code. Is there any benefit to going with
    <?php include("top.php");?> as opposed to <?php include("top.html");?> ???

    In other words: is there any benefit for the included file to also be php? Since I'm still using mainly Frontpage (then copy/pasting the code to my web hosting text editor to save in .php) saving inlcudes in .html lets me simply upload the includes rather than copy/paste them as well. But am I losing out in some other way by not using the same extension as often as possibly (uniformity reasons, etc.)

    Many thanks in advance,

    AG

  9. #8
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Actually, either will work pretty much the same as once it include is called... The php processor is running, even if you have some php scripting written in the .html file... It will be processed.

    From a troubleshooting aspect it's always best to name he file with whatever extension of the scripting language you're using... In this case, 6 months down the road, you decide you need to add a small piece of php code to the header.html file... It will actually work, but if you tried to call th file by itself ( manually ), it won't execute the .php code in it...

    Naming all your includes the same (.php in your case ), is just good practice.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:47 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com