Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Apache html and php problem [newbie]
September 8, 2006, 11:19 am
rate this thread
I'm not getting php to do anything in the following index.htm script
Php works fine as a .php script but placing it in a html script yields
zip, nada, zilch.
Is it a httpd problem or php.ini ???
<html><head><title>Firstpage by me served</title></head>
let's try that again with some php
print "hello php";
Re: Apache html and php problem [newbie]
Apache (and all other web servers) are (by default) configured to use
certain file types, some are just plain text containing layout (e.g.
HTML) and other have programming logic in them (e.g. PHP, CGI, PL). The
latter are first preprocessed (in this stage the logix is being
evaluated) and afterwards the result is displayed to the requesting
browser. HTML however is not interpretated and is send to the browser
directly. PHP content in the HTML file does not trigger the webserver to
interpretate the code, but it does when it is in a PHP file as HTML and
PHP file types are handled differently by the server.