PHP Shorthands are not working in my Site

ankokuflare

New Member
Messages
2
Reaction score
0
Points
0
I'm trying to include a php file
Code:
<?php include("menu.php"); ?>
from my host in my .htm webpage.
I got nothing. I also tried editing the htaccess as well.
It worked perfectly fine in my previous host,but why not in here?
 

akkudreamz

New Member
Messages
183
Reaction score
0
Points
0
the code is working fine
you can't use php code in an .htm file....you need to save your .htm as .php
 

Scoochi2

New Member
Messages
185
Reaction score
0
Points
0
the code is working fine
you can't use php code in an .htm file....you need to save your .htm as .php
Actually, PHP can be run in a .htm or .html file, but it requires editing of .htacess

Code:
AddType application/x-httpd-php .htm .html
Add the above to a .htaccess file, save it and *bingo*! (hopefully).

If you're unfamiliar with .htaccess files, create a new file named EXACTLY '.htaccess' (without the quotes, nothing before the period!). In it, put the above and save it to your root directory.
 
Last edited:

freecrm

New Member
Messages
629
Reaction score
0
Points
0
Stupid question... does your new host support php?

Simple enough to find out, because the code remains in the source code when you open the page.

Just try a simple echo statement.

either that, or try phpinfo();
 
Top