0

I would like to add this code on a global source of a software chat:

<?php
include "../../../mc.php";
include "../../../std.php";
?>

I put it on one file called "loggedIn.html" and "loggedOut.html", so i changed the name of both files to the extension ".php". The point is that the software does not recognize me that simple statement, it takes as a comment, as you can see in the picture below:

The code does not recognize my include php tag.

My server support php 5.4 and all complements of the language very well.

I am a beginner programming in php and i would like to now what happened in the code, please help me.

(Sorry for my english, i am Mexican, i am studying english).

Regards, Christopher Coria.

1 Answers1

0

You cannot put PHP content in a file with an .http extension because then your webserver does not interpret PHP code as PHP but as plaintext.

I recommend to put your code in a .php file instead.

If there is no way to put your code into another file or change the file extension to .php, your can force your server to interpret HTML files as PHP files by adding the following line to your.htaccess files:

AddType application/x-httpd-php .html

Drudge
  • 508
  • 5
  • 19