php inside html
Moderator: General Moderators
I'd write an email. 'Dear customer support, ...'
Show them you already know what you want and how your problem can be solved. All you want to know is wether the server (their server) configuration allows it or not.
current state:
files with the extension .php are handled by the php module. files having .html are not.
I.e. the php script index.php works fine while the same file saved as index.html is delivered as-is (with php source code).
target state:
index.html (and all files having .html as extension) are handled by the php module.
possible solutions:
adding .html to the list of extensions associated with application/x-httpd-phpas explained at http://httpd.apache.org/docs/2.0/mod/mo ... ml#addtype
question:
Does the server hosting my account reflect settings in .htaccess?
Do I have the required permissons?
Show them you already know what you want and how your problem can be solved. All you want to know is wether the server (their server) configuration allows it or not.
current state:
files with the extension .php are handled by the php module. files having .html are not.
I.e. the php script index.php works fine while the same file saved as index.html is delivered as-is (with php source code).
target state:
index.html (and all files having .html as extension) are handled by the php module.
possible solutions:
adding .html to the list of extensions associated with application/x-httpd-php
Code: Select all
AddType application/x-httpd-php .php .htm .htmlquestion:
Does the server hosting my account reflect settings in .htaccess?
Do I have the required permissons?
If not do you provide an alternative to have .html files handled by php?http://httpd.apache.org/docs/2.0/mod/mod_mime.html#addtype wrote:Override: FileInfo
i have the same problem with my hosting...though the prowider say it's cas of a security and CPU power...

the SOURCE code of HTML file looks like this..
file is something.HTML
and i dont see PHP echo command....
if i change it to something.PHP the php code executes...
the SOURCE code of HTML file looks like this..
Code: Select all
<center>This is pure HTML</center>
<?php echo "This is pure PHP"; ?>
<center>This is pure HTML second time</center>and i dont see PHP echo command....
if i change it to something.PHP the php code executes...
Can this information be read from the phpinfo page?volka wrote: Does the server hosting my account reflect settings in .htaccess?
Do I have the required permissons?http://httpd.apache.org/docs/2.0/mod/mod_mime.html#addtype wrote:Override: FileInfo