Some thing wrong in this code.. Pls help

<? if ( $_GET['go'] != '' ) { include($_GET['go']); } ?>

Here i will tell what my prob actually is…

Consider
The file 123.html contains images which are also in the same dir(content)…
If i execute Http://www.youngbuddy.com/main.php?go=content/test.html

When includeing the html file on the main page… it includes it as if it’s actually executing the file. So it’s trying to get the image file from the same dir where main.php is present and not the dir content/. It is not posible for me to change all the locations of images, pages, etc from the root dir… for that main.php file… So i want a script which exactly looks like the code in this site

http://www.tamilflame.com/test.php?go=home.php
http://www.tamilflame.com/test.php(code of this file is needed)
http://www.tamilflame.com/home.php

http://www.tamilflame.com/test.php?go=hgoogle.com
Not only google any site can be done with this

Any one know how to do this? pls help me

a script like that can hardly bee securte. (and u should have mentiont that it is missing the images of the google side as well)

i’d sugest u do something else.

either ude a static include in ur home.php file including a header and fooder to get the side around.

or take a look at this topic: http://phphelp.com/forums/viewtopic.php?t=7942

to get the imagereferences working u my just make them absolute path:

<img src="/content/Image.jpg">

btw: the included file sould have no or -tag.

hope this helps

edit: the link was not working

http://phphelp.com/forums/viewtopic.php?t=794 Link not working

sry was a copy and paste error:
http://phphelp.com/forums/viewtopic.php?t=7942

Sponsor our Newsletter | Privacy Policy | Terms of Service