PHP IN HTML

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP IN HTML

Postby neilneil2000 » 07. November 2006 23:46

Hi, I am pretty new to web hosting so I apologise in advance if this has been answered many times before.

I have been trying to include php code within my html web pages but can't get it to work!

I have found things on the web about altering the .htaccess file but can't get it to work.

My .htaccess file is currently as below ( a mess I know):

RemoveHandler .html .htm
AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm
AddType text/html .htm
AddHandler server-parsed .htm
AddHandler server-parsed .html
Options Indexes FollowSymLinks Includes

AuthType Basic
AuthName "FORBIDDEN AREA"
AuthUserfile "../htdocs/forbidden/.htpasswd"

Require valid-user

***END .HTACCESS***

I am running the latest XAMPP Basic package
neilneil2000
 
Posts: 1
Joined: 07. November 2006 22:46

Postby Izzy » 08. November 2006 03:05

If you have mixed html code and php code in the one page file then rename the file with a php extension.
Example:
index.php instead of index.html
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby Sean-Michael » 10. November 2006 08:28

another way, that some may not like is to either use iframe or use a web redirect and as izzy mentioned rename your page to a php that the web redirect points to'
Sean-Michael
 
Posts: 69
Joined: 17. September 2006 01:37


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 199 guests