PHP echo does not apear in html

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LaoDe
    New Member
    • Sep 2006
    • 9

    PHP echo does not apear in html

    Hi,

    Even a very easy php-in-html script does not work in my environment and I can't find any tutorial, which tells about how to bring the pieces together.

    Here is my 'giant' code:

    <html>
    <head>
    <title>a giant hmtl page</title>
    </head>
    <body>
    <? print "php output "; ?>

    </body>
    </html>

    I'm running apache, do I need a PHP-Modul to display that ?

    All pure php-scripts works fine.
    I can pass html-forms to a php-script for output and this works fine, all through apache, but why do I see no output in the above simple sample ?

    please excuse such easy questions, but I don't see reasonable tutorials of how to bring all parts from html, PHP, mySQL, Apache together. It is nice documented how it should work, but if it does not and do not show any error-message, how to learn debugging ?

    thanks for any tip, LaoDe
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You probably have given this test snippet a file type . html or alike.
    Change the file type to .php and run it again.

    Ronald :cool:

    Comment

    • samui
      New Member
      • Sep 2006
      • 8

      #3
      Also remember that the code is very touchy...

      I find it easier to make html statements in php by using the following...

      [php]

      <?php

      echo "<html code blah blah>"

      ?>
      [/php]

      Comment

      Working...