You are here: Re: PHP in html « PHP Programming Language « IT news, forums, messages
Re: PHP in html

Posted by Anonymous on 07/27/07 15:55

John wrote:
> >A php include has to go in a php file.
> >
> >HTML includes are normally done using SSI.
> >
> >If you are using HTL includes then you are asking in totally the wrong
> >place.
>
> That is incorrect.
>
> You can have php includes in a html file.

In theory, yes. In practice, no. Because most webservers are not
configured to parse a .html file through PHP.

If the filename does not end in .php (.php5 or other widely accepted
extension which denotes a PHP file) it won't be parsed and the PHP
include won't get executed.

Sure, if you have total control of the webserver you can tell it to
parse every file through PHP but this is considered bad practice as it
will slow down the server.

Bye!

 

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

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