SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: PHP Probelms

  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Probelms

    Okay, I am redesigning my site (the new template: http://mmp.netblue.co.uk/~carfreak/cars/template.htm) and everything should be working HOWEVER the php news boxs won't show up. So what should I do:
    News Box
    HTML document that should show the news box
    <!--#include virtual="news/news.php" --> Code in the aftermentioned HTML document

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the problem is that you are including a PHP page inside an HTML page. Pages with the extension .html can't be used to parse PHP code, so the code won't show up. You might want to try to rename the page with a .php extension. I think the news box should show up then.

  3. #3
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am setting up my site so it is pretty much a portal but with the customablity that comes with having a HTML main page. The SHTML page that I gave the link to just has a Body and Head and the script to display the news box. The news box is a php document.
    Here is the code to the aftermentioned SHTML page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
    <HTML>
    <HEAD>
    <TITLE>[No title]</TITLE>
    <META NAME="Generator" CONTENT="Stone's WebWriter 3.5">
    </HEAD>
    <BODY>
    <DIV STYLE="text-align:center">

    <!--#include virtual="/news/news.php" -->


    </BODY>
    </HTML>

  4. #4
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your path is probably wrong - try it without the forward slash at the start. It's better to use pure PHP pages if you are including PHP scripts rather than SSIs - rename the page to index.php and replace your include virtual line with <?php include('news/news.php'); ?>


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
  •