SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php parsing? newbie needs help

    I'm extreme-newbish here. I used one of those php poll scripts, and need to include it in my .shtml file. Can I do this? I heard something about php parsing, but I'm not really sure what it does/how to do it. Is this what I need?
    Here is the line of code that I insert in the html file.

    PHP Code:
    <?php $newest_poll 1; require("/home2/greenbirdz/phppoll/booth.php"); ?>
    When I view the page, nothing appears there. Help please? thanks in advance

  2. #2
    code addict Abstraction's Avatar
    Join Date
    Apr 2001
    Location
    Des Moines, IA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Give your file a .php extension.

  3. #3
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, but I need it to be shtml! Is there something else I can do? Can I have SSI and PHP in the same file?

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately if you are trying combine SSI (.shtml extension) and PHP you may need to do more than Abstraction has suggested. You may opt to change your SSI to PHP using include().
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool..

    So could change it to php.. and then change SSI call I have on there to php too? here's the SSI (it calls on NewsPro)

    PHP Code:
    <!--#include virtual="/waverace/news/news.txt" --> 
    could you change that to PHP for me? I'd be so appreciative if it was possible.

  6. #6
    code addict Abstraction's Avatar
    Join Date
    Apr 2001
    Location
    Des Moines, IA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    include ("waverace/news/news.txt");

    And here's a reference for you on the include function.

  7. #7
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow, it worked! *jumps out window*

    Thanks guys


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
  •