DEV Community

geovane400
geovane400

Posted on

Can you help me please

I am creating an English site, to work as a blog. I'm starting in the world of programming so I have a lot of doubts. Going straight to the point, I found it difficult to modify a line of HTML code, for example: my header, I use the same for all pages on the site, but when I change a line on a page I have to keep changing all pages and it takes a lot of time and is boring to do. There is some way to standardize the header, like creating a standard header and "call it" whenever I want, so I only modify the header once and it will work for all pages. I don't know if I was clear, I hope so. I try to do this with PHP, and calling the header. PHP through includes. But it did not work. When I run index.Php only the code appears and nothing else. As if the browser has not interpreted the code. Anyway, is there any way to do without PHP? Thanks

Top comments (5)

Collapse
 
manishfoodtechs profile image
manish srivastava
  1. Download xampp or wampp in your pc. Because, html css js are client side while php or any other dynamic language will require http server.
  2. If you are going to host it with domain then look for c panel. It is good for beginners with lots of help material around.
Collapse
 
manishfoodtechs profile image
manish srivastava

Also read here how you can add header without php just by html :
dev.to/merri/server-side-includes-...

Collapse
 
geovane400 profile image
geovane400

I've installed wamp server like you and Adam told me. And it works.
Thanks.❤️❤️❤️

Collapse
 
brewinstallbuzzwords profile image
Adam Davis

I haven't used php before, but it sounds to me like you're opening the code instead of running it. You probably need to run a web server in order for it to work the way you want it to.

I think this answer on StackOverflow may be what you're looking for.

Collapse
 
geovane400 profile image
geovane400

Thank you, I'm gonna try.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.