How do I get my web server to read PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sIncognito
    New Member
    • Apr 2010
    • 7

    How do I get my web server to read PHP?

    my server is not executing the PHP code what are some specific things I can check to remedy this???

    Only the HTML is Showing up in my browser.


    Thank you.

    Here is the code (although I don't believe it is the code):

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
        <title>Today&rsquo;s Date</title>
        <meta http-equiv="content-type"
    	  content="text/html; charset=utf-8"/>
      </head>
      <body>
        <p>Today&rsquo;s date (according to this web server) is
          <?php
    
    	echo date('1, F dS Y.');
    
    	?>
        </p>
      </body>
    </html>
    Last edited by Atli; Sep 11 '10, 03:54 PM. Reason: Please use [code] tags for when posting code.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    What is your web server?
    Apache or IIS?

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Remember, you file will most likely need the .php extension for it to be executed by the server. Have you installed PHP?

      Comment

      • mi6crazyheart
        New Member
        • Sep 2010
        • 1

        #4
        create a php file by using following lines...

        <?php
        phpinfo();
        ?>

        Now save this file in u'r root folder & access it by user browser by typing http://localhost/fileName.php

        If u've installed PHP & that's working properly u'll get a page with having all PHP related information...

        Comment

        Working...