GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   How to insert html page into another page? (https://gfy.com/showthread.php?t=963879)

fatfoo 04-16-2010 02:26 PM

How to insert html page into another page?
 
Hello,

Let's say you have a top.html and you want to insert it into index.html.

What are some ways to do this?

I tried these 3 lines of code, but they did not work.

<!--#include virtual="top.html">

<?include "top.html"?>

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

Thank you,
Fatfoo

mikke 04-16-2010 02:41 PM

rename index.html to index.php and try
PHP Code:

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

;)

Stef. 04-16-2010 03:39 PM

ask a guy with that much gfy posts count and so clueless ?!?!? LOL :1orglaugh:1orglaugh

fatfoo 04-16-2010 07:52 PM

Quote:

Originally Posted by mikke (Post 17039134)
rename index.html to index.php and try
PHP Code:

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

;)

I will try that...

DigitalTheory 04-16-2010 07:55 PM

Quote:

Originally Posted by mikke (Post 17039134)
rename index.html to index.php and try
PHP Code:

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

;)


exactly this, a php include will not work on an html page.

HomerSimpson 04-19-2010 04:49 PM

Quote:

Originally Posted by DigitalTheory (Post 17039769)
exactly this, a php include will not work on an html page.

well it could work if you say apache to parse .html files as php ones...
you should add something like this to your htaccess
Code:

AddHandler application/x-httpd-php htm html
but that depends on server config (ask your hosting provider for this line).

this way you can use php inside .htm or .html files...

if you have lot's of .html files try to avoid this.
you can also do it by mod_rewrite...

hit me up for specific details
(icq in sig)


All times are GMT -7. The time now is 07:07 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123