stars
01-22-2009, 06:18 PM
I downloaded an open source php script called "tell a friend" and I want to use php include code to embed the tell a friend into my web page.
My steps are:
1. I put the content of tell a friend into a folder named "friend" and put it in the root directory.
2. I made a friend.php file as follow:
<?php
include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/header.php');
include(dirname(__FILE__).'/friend/index.php');
include(dirname(__FILE__).'/footer.php');
?>
Now when I key in www.mysite.com/friend.php, all I see is my header and footer, but there is no content in it. The tell a friend is not in.
But when I key in www.mysite.com/friend/index.php, I only see the tell a friend script, with out my header and footer.
What have I done wrong? How to connect these two files together?
Please help.
:confused:
My steps are:
1. I put the content of tell a friend into a folder named "friend" and put it in the root directory.
2. I made a friend.php file as follow:
<?php
include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/header.php');
include(dirname(__FILE__).'/friend/index.php');
include(dirname(__FILE__).'/footer.php');
?>
Now when I key in www.mysite.com/friend.php, all I see is my header and footer, but there is no content in it. The tell a friend is not in.
But when I key in www.mysite.com/friend/index.php, I only see the tell a friend script, with out my header and footer.
What have I done wrong? How to connect these two files together?
Please help.
:confused: