Results 1 to 4 of 4

Thread: Can you please check to see if my code s are wrong?

  1. #1
    Join Date
    Jan 2009
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Can you please check to see if my code s are wrong?

    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.


  2. #2
    Join Date
    Jan 2009
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Please help

    Please help....

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Jan 2009
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •