| 
	
 | 
 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] 
 |