Weee! My first post!
Take a look at this JavaScript...
<script>
function init()
{
var e = document.getElementById("image");
if (e) e.src = location.hash.substr(1);
}
</script>
</HEAD>
<BODY onload="init();">
<IMG SRC="" id=image>
What image to be shown on the html site is the file you type in the url (document.html#picture.jpg).
Now for the question. How to do if I want a html document instead of an image? Who can make a php script that does that or is there a script for that already?
Include something with the URL?
Moderator: General Moderators
hmm, you mean this?
example..
http://www.yoursite.com/index.php?file=main.html
Code: Select all
<?php
$file = $_GET['file'];
include($file);
?>http://www.yoursite.com/index.php?file=main.html