I can't use PHP. Every time I put it on my website, it either doesn't pop up or shows the code itself. How do I fix this?
(Just started using PHP, I'm not good.)

Recommended Answers

All 4 Replies

Member Avatar for diafol

If it shows the code, you're probably using .html as the file extension. Use the .php extension for any file with php code in it.

Whenever I add the .php extension, it shows all of the code.

Does your webserver support PHP files? Do you manage your web server, or is this being hosted somewhere?

Do you have a link to one of the pages to look?

I just returned the PHP book I got to the library, so I can't do PHP anymore.(not like I actually want to take the time to learn my 4th code).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.