Reputation: 11
Yesterday I discovered a website called Too Plate:
https://www.tooplate.com/about
It has free HTML templates, and all they are very beautiful. I had the idea to turn the theme that I chose to PHP, so, I just renamed the file index.html to: index.php But, when I open it using a brwser, all the style is gone... As if the template could not find the CSS file... But I just renamed the file, I did'nt change anything inside the code (I only added the "" tags a the beginning...) This is the template:
https://www.tooplate.com/view/2122-nano-folio
How can I fix this, please?
Upvotes: 0
Views: 455
Reputation: 315
Once you add the PHP extension it handles the file as a PHP script, which is a server-side language that's get executed on the server before loading the page, so to view ant PHP file you have to have a server running the PHP code, but HTML runs on any browser.
So what happened was that because you changed the extension the browser treated it as a PHP script and cant Execute the script because it's not a server.
Upvotes: 1
Reputation: 69
you must need to run the code in server eg: local servr xampp or wampp then only your php code work try this
Upvotes: 0