You are here: Re: Problem installing PHP5 on WinXP and Apache2 « PHP Programming Language « IT news, forums, messages
Re: Problem installing PHP5 on WinXP and Apache2

Posted by Gordon Burditt on 10/21/05 01:00

>That did the trick! It works fine as index.php. I was under the
>impression that any <?php...> in an html file would be treated as a
>script - is this not the case?

No. And you can bet that the string '<?php' occurs not infrequently
in image and audio files, too.

>Do I need to make every file with a
>script a .php? I need to do some reading it seems.

You need to identify every PHP script as a php script with
MIME type application/x-httpd-php. This is often done
with a directive in the Apache config file like:
AddType application/x-httpd-php .php
You could to this to the file extension .php3, or .txt, or .html,
or .gif if you want. (In the case of .gif, that's pretty nasty,
and in the case of .html, it means all pure html files will be
processed by PHP, which is a bit of overhead but probably not too
bad.) The AddType directive can also be used in .htaccess files
on a per-directory basis.

Gordon L. Burditt

 

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

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