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