Re: why does PHP parse "*.html" files in one subdir/ but not in another?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/7/19 Paul M Foster <paulf@xxxxxxxxxxxxxxxxx>:
> On Sun, Jul 19, 2009 at 09:30:33AM +0530, kranthi wrote:
>
>>
>> > You do realize that PHP does not parse HTML files, right? The web server
>> > does that. In fact, the web server also parses PHP files, using a
>> > different library.
>>
>> Kindly elaborate If you are saying that PHP cant parse files with
>> extension .html
>> http://us2.php.net/manual/en/security.hiding.php.
>
> That's exactly what I'm saying. Apache or IIS (or whatever) discern the
> contents of a file and determine how to parse it. As far as I know,
> Apache, even with a PHP file, parses the HTML in the file and hands PHP
> off to a PHP module to decode. The PHP engine itself does not parse the
> HTML which is interspersed in and amongst your PHP code. The web server
> does that. Unless some php internals person says otherwise, that's the
> story. At best, the PHP engine would simply echo non-PHP text to the
> browser, which is not parsing it.

Actually that's not accurate. The web server does nothing with a file
before it passes it to the PHP engine. PHP gets the entire file, it
simply echo's anything not inside PHP tags.

In general web servers don't know or care about the format of the
files they serve. You configure certain extensions to be passed to
certain modules, even in the case of something like SSI. The web
server itself doesn't usually "parse" any of the files it serves.

-Stuart

-- 
http://stut.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux