PDA

View Full Version : Can you please check to see if my code s are wrong?



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:

stars
01-23-2009, 11:58 PM
Please help....

djr33
01-24-2009, 12:18 AM
Can you link?
Something is wrong with your setup, in terms of the layout (directories) or the strategy you're using... but I don't know what. The code you have looks alright (no errors in the code, just something in the logic). One thing is that you might not have the .js file included into the main page, or it may be included at the wrong place in the code, but we'd need to see html source to determine that.

stars
01-24-2009, 02:23 AM
Can you link?
Something is wrong with your setup, in terms of the layout (directories) or the strategy you're using... but I don't know what. The code you have looks alright (no errors in the code, just something in the logic). One thing is that you might not have the .js file included into the main page, or it may be included at the wrong place in the code, but we'd need to see html source to determine that.

Thank you very very much for your help. My site is still work in process. Can you PM me so that I can send you the link? You mean I have to put a .JS file in the main page for the include to work? I am not sure what you mean by that. If that is the case, I did not include any .JS file in the main page for this issue....

Thanks again for your help.