How Can I Embed PHP Statements That Will Work?


Author Message
locpicker

Posted: 10/10/2011
Quote message 

I am working on making some html sites using the new version of Artisteer and I cannot get embedded php statements to work.

Why does this not work?

How can I make this happen?
 
locpicker

Posted: 10/10/2011
Quote message 

I forgot to add that I am trying to do this in html templates.
 
Terry J

Posted: 10/11/2011
Quote message 

When using html files and wanting to include php, I use the .htaccess file.

Simple tutorial:

http://php.about.com/od/advancedphp/p/html_php.htm

You may have to contact your hosting company if the above does not work for you. Servers vary. If on a windows server I have no clue, sorry,

Terry
 
locpicker

Posted: 10/11/2011
Quote message 

For Hostgator you need to use this: AddHandler application/x-httpd-php5 .html .htm and put it in a .htaccess file.

I just found this out from support. They are doing it to keep the server from working so hard.


 
txinva

Posted: 10/11/2011
Quote message 

Could not tell from your post, but if you are embedding php code in html file, don't for get to make your file name have the .php extension instead of the .html. In other words if you have mypage.html, in order for the php to run, you will need to rename page to mypage.php
 
Garry

Posted: 10/11/2011
Quote message 

Following basic tutorial may be helpful: http://www.ntchosting.com/php/php-in-html.html
 
No hope

Posted: 10/13/2011
Quote message 

Honestly, I don't think you can do it. Because you're too much of an idiot to post this in the right forum in the first place.