Stefan van Roosmalen wrote:
The first page of my Internet website must be INDEX.HTM.
But, if I want to embed some PHP code in this page, I must rename it to
INDEX.PHP.
Easy, but not simple, because INDEX.PHP will not load as the default
startup-page of my website.
Are you assuming the first page has to be index.htm? Because if you tried an
index.php, but didn't rename the index.htm, in most setups, the HTM would take
precedence over the PHP. If this is the case, make an index.php and rename
index.htm to something else like index-backup.htm. Also, make sure there are no
index.html, index.cgi, etc.
If that still doesn't work you can make an .htaccess file if you're using
Apache. You can go 2 routes:
Override your server's default directory index:
DirectoryIndex index.php
Or, force Apache to treat index.htm as a PHP file:
<Files index.htm>
ForceType application/x-httpd-php
</Files>
Just add whatever lines you want to the existing .htaccess, or, if one doesn't
already exist, create a file called .htaccess with whatever lines you want and
put it in your server's web root. Be careful you don't overwrite existing
..htaccess files and be aware that whatever you specify will be inherited by
child directories (i.e. if you make index.php the default directory index at
http://www.yourdomain.com/, it'll be the default at
http://www.yourdomain.com/subdirectory/).
If these options don't work, please tell us what server you're using...
Shawn
--
Shawn Wilson
sh***@glassgiant.com http://www.glassgiant.com