SitePoint Sponsor

User Tag List

Results 1 to 19 of 19

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2012
    Location
    Northern New Brunswick, Atlantic Canada
    Posts
    44
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Extensions missing for PHP?

    Another complex question - that probably has a simple answer.

    I am trying to execute a php code in my html file. It won't work at all. Doesn't even start.
    A basic example, like:

    <?php
    echo "Hello There";
    ?>

    Nothing happens. NOTE: This is on a real server - not my local machine.
    Full php files work, but not code islands in html.
    The server is running Linux, and PHP Version 5.2.17.

    The file I'm testing with is: i-graphicsdesign.com/test/index.htm
    If you look at the page source you can see what's missing.
    <snip>

    If I change the htm extension to php the file works.: i-graphicsdesign.com/test/index.php

    Is there a different way of calling php on a Linux server,
    or
    does the php installation have to be configured to recognize htm as a possible php code source?
    Or (horrors)
    do I have to use the php extension on every file that contains php code?
    Last edited by ralph.m; Sep 22, 2012 at 16:14. Reason: removed compromising server info


Tags for this Thread

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
  •