I build a site in html code, and when Im trying to connect between the PHP script and the HTML code it sends me to a page, that the PHP script is writed there instad of activating the script. what can I do?
Asked
Active
Viewed 49 times
-1
-
do you have PHP installed on your server at all? – Sameer Kumar Jain Apr 09 '16 at 12:15
-
Do you have a server with PHP installed on your machine? – callback Apr 09 '16 at 12:15
-
make sure you have a `.php` extension and that youre viewing the file in the browser via the server, not locally. – DevDonkey Apr 09 '16 at 12:16
2 Answers
0
Are you using xampp or some kind of server to run the file?
If not download xampp, start apache and mySQL, put the files into htdocs and then run it by typing localhost/filename.html and click on the link which will take you to the php file. It should display the php file then.

lukas13x
- 73
- 1
- 12
-1
for some configurations, if your page has any PHP code, the extension must be .php and not .html

nekiala
- 450
- 9
- 21
-
a valid comment (sometimes) but surely this is not worth an answer! – YvesLeBorg Apr 09 '16 at 12:23