Simple question needs solving, putting a string in a php include? lol.

Discussion in 'PHP' started by MediaHustler, Feb 1, 2006.

  1. #1
    Can someone help me put this together?

    $showall=1
    ^^^^ string
    include('../commenter/commenter_cnt.php')
    ^^^^include
    Can someone assemble that so I don't get any more unexpected T_STRINGS please?

    Thank you.
     
    MediaHustler, Feb 1, 2006 IP
  2. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am not sure what you mean? Is this all the code?
     
    dave487, Feb 1, 2006 IP
  3. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Where is my error?

    <!--- Comments --->
    <center>
    <a name="comments">
    <?php
    $showall=1;
    include('../commenter/commenter_cnt.php');
    ?>
    </a>
    </center>
    <!/--- Comments --->

    Where is my error?
     
    MediaHustler, Feb 1, 2006 IP
  4. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Assuming the path to the file is correct that code should work fine (try the absolute http://www....../commenter_cnt.php reference maybe).

    If you get an error maybe its in the commenter_cnt.php script?
     
    dave487, Feb 1, 2006 IP
  5. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Nope it's definately wrong.
    Parse error: parse error, unexpected T_STRING
     
    MediaHustler, Feb 1, 2006 IP
  6. TommyD

    TommyD Peon

    Messages:
    1,397
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    0
    #6
    First: are you sure you are at the right line in the orginial page.

    Second: have you checked the included page for errors too?

    :confused:
     
    TommyD, Feb 1, 2006 IP
  7. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #7
    <!--- Comments --->
    <center>
    <a name="comments">
    <?php
    $showall=1;
    include('../commenter/commenter_cnt.php');
    ?>
    </a>
    </center>
    <!/--- Comments --->

    LOL how could I not see that
    I took out the " and replaced them with '
     
    MediaHustler, Feb 1, 2006 IP