You are here: Re: Apache html and php problem [newbie] « PHP Programming Language « IT news, forums, messages
Re: Apache html and php problem [newbie]

Posted by Jonathan on 09/09/06 15:56

Frel wrote:
> On Fri, 08 Sep 2006 21:19:45 +1000, Frel wrote:
>
>> Hi,
>>
>> 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.
>
> I mean it prints out the stuff in htm but nothing in the <?php ..?> part
>
>> Is it a httpd problem or php.ini ???
>>
>> TIA, frel
>> =======================
>> <html><head><title>Firstpage by me served</title></head>
>>
>> <body>
>>
>> let's try that again with some php
>> <b>
>> <?php
>> print "hello php";
>> ?>
>> </b>
>>
>> </body>
>>
>> </html
>

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.

Jonathan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация