Tuesday 25 February 2014

Anything better than HTML Frames

Posted by Саша 22:59, under | No comments


Anything better than HTML Frames? Anything better than HTML Frames?

I posted earlier asking about how to fix my frame code in HTML. Someone responded saying that frames are not the best way to build a website.
So what is the best way? I would strongly prefer it to be in HTML or CSS, but I will learn PHP if you provide an extremely easy
Beginner tutorial. By the way, can HTML-Kit code PHP?

Thanks a lot!!


Other Answers:




There is nothing wrong with frames. Most people don't like them because they don't know how to code them so they work. But, Server Side Includes would allow you to put anything on ALL your pages that may require editing from time to time. Editing just the include file and overwriting the old one will propagate all the corrections to all the pages that have the include code.

You can use PHP include codes or just use the other non-php ones and modify the .htaccess file to set up SSI. Must have a hosting service that allows SSI whether you use PHP includes or not.

Ron



If you only want to be able to include a sidebar into every page of your website, it is simple in PHP. Obviously, your web host needs to support PHP. If it does, you can do the following:

1. Cut the sidebar HTML out of your page and put it in a separate page, name this page "sidebar.html" or "sidebar.php" or whatever.
2. In your page code, where the sidebar should be, put the following:
<?php include "sidebar.html"; ?>
3. Make sure your pages are saved as .php files instead of .html files.
4. Upload to server.

If you do it right, you will see your sidebar HTML integrated seamlessly into your page HTML.






0 коммент.:

Post a Comment