I need help getting an unexpected T_STRING error

Discussion in 'PHP' started by Forum-Angels, Nov 2, 2006.

  1. #1
    Ok Im a n00b when it comes to php so I was trying something.
    I wanted to add a rss feed into a php file ok, i have the rss feed code and I went into the php file and put the code where i wanted it.
    This is the code I put in -
    <table style="width:100%;" class="mainmenu5" cellspacing="0" cellpadding="4"> 
    <tr> 
    <td style="font-size:8pt;text-align:center;"> 
    <b>Top 3 Msn Song Downloads</b> 
    <?php 
    define('MSIFETCH_DIR', '/home/topuk/public_html/music'); 
    require_once(MSIFETCH_DIR.'/msifetch.inc'); 
    echo get_html('a:18:{s:6:"active";a:1:{i:0;s:57:"http://music.msn.com/services/rss.aspx?chartname=topsongs";}s:8:"inactive";a:1:{i:0;s:42:"http://movies.go.com/xml/rss/boxoffice.xml";}s:7:"feedurl";s:7:"http://";s:8:"textarea";s:94:"http://news.search.yahoo.com/usns/ynsearch/categories/news_story_search_rss/index.html?p=AUDIO";s:9:"textarea3";s:68:"http://news.google.com/news?hl=en&ned=us&ie=UTF-8&output=rss&q=AUDIO";s:8:"rss_desc";s:1:"1";s:12:"rss_max_news";s:1:"2";s:13:"rss_title_len";s:1:"5";s:20:"rss_feed_title_color";s:0:"";s:10:"disp_width";s:3:"200";s:15:"disp_background";s:5:"WHITE";s:13:"disp_bord_col";s:7:"#000000";s:15:"disp_bord_thick";s:1:"0";s:15:"disp_bord_style";s:4:"None";s:13:"disp_text_col";s:7:"#CC0000";s:14:"disp_text_font";s:22:"Comic Sans, sans-serif";s:14:"disp_text_size";s:2:"15";s:6:"submit";s:14:"Fetch RSS Feed";}'); 
    ?> 
    </td> 
    </tr> 
    </table> 
    </td> 
    </tr> 
    </table> 
    <br/> 
    Code (markup):
    And it gives me this error -
    Parse error: syntax error, unexpected T_STRING in /home/topuk/public_html/music/index.php on line 788

    What do I do to fix it?
    Also the code on line 788 is (red line) -
    <?php
    [COLOR="Red"]define('MSIFETCH_DIR', '/home/topuk/public_html/music');[/COLOR]
    require_once(MSIFETCH_DIR.'/msifetch.inc');
    echo get_html('a:18:{s:6:"active";a:1:{i:0;s:57:"http://music.msn.com/services/rss.aspx?chartname=topsongs";}s:8:"inactive";a:1:{i:0;s:42:"http://movies.go.com/xml/rss/boxoffice.xml";}s:7:"feedurl";s:7:"http://";s:8:"textarea";s:94:"http://news.search.yahoo.com/usns/ynsearch/categories/news_story_search_rss/index.html?p=AUDIO";s:9:"textarea3";s:68:"http://news.google.com/news?hl=en&ned=us&ie=UTF-8&output=rss&q=AUDIO";s:8:"rss_desc";s:1:"1";s:12:"rss_max_news";s:1:"2";s:13:"rss_title_len";s:1:"5";s:20:"rss_feed_title_color";s:0:"";s:10:"disp_width";s:3:"200";s:15:"disp_background";s:5:"WHITE";s:13:"disp_bord_col";s:7:"#000000";s:15:"disp_bord_thick";s:1:"0";s:15:"disp_bord_style";s:4:"None";s:13:"disp_text_col";s:7:"#CC0000";s:14:"disp_text_font";s:22:"Comic Sans, sans-serif";s:14:"disp_text_size";s:2:"15";s:6:"submit";s:14:"Fetch RSS Feed";}');
    ?>
    Code (markup):
    Thanks
     
    Forum-Angels, Nov 2, 2006 IP
  2. esiason14

    esiason14 Peon

    Messages:
    272
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try double quoting them?

    define("MSIFETCH_DIR", "/home/topuk/public_html/music");
    Code (markup):
     
    esiason14, Nov 2, 2006 IP
  3. kreoton

    kreoton Peon

    Messages:
    229
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    are you wrote function get_html? i can't find in php function list
     
    kreoton, Nov 2, 2006 IP
  4. Forum-Angels

    Forum-Angels Peon

    Messages:
    469
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hmm I got it from the feed generator program, which gave me that code. I am goin gto get a new feed program I think.
     
    Forum-Angels, Nov 3, 2006 IP