I recently learned PHP and got stuck in chapter 3. I have referenced an HTML template, but this template cannot reference the css file. this is the HTML template: {code ...} however, I add: {code...} to the & amp; lt; style & amp; gt; label in the header ...} it works again. Passed review...
I recently learned PHP and got stuck in chapter 3. I have referenced an HTML template, but this template cannot reference the css file. this is the HTML template:
<?php echo $page_title; ?>
Your Website catchy slogan...
- Home Page
- Calculator
- link three
- link four
- link five
However
Yes, it can work:
My project file structure:
Reply content:
I recently learned PHP and got stuck in chapter 3. I have referenced an HTML template, but this template cannot reference the css file. this is the HTML template:
<?php echo $page_title; ?>
Your Website catchy slogan...
- Home Page
- Calculator
- link three
- link four
- link five
However
Yes, it can work:
My project file structure:
The relative path is wrong. change the path to your php reference and move the line of link down.
Css. you can see if it is a path problem.
Relative path
I think your template has two points, that is, the directory at the upper level.
The style label is a vertex.
By the way, use Link to reference this path../includes/style.cssOr not.
Why use PHP to reference css files? This is unscientific.
Css references are all used
In this form of =, you are the php include file, css does not need that
Is there a problem with the path? why did you introduce css in header.html?
It should be./style.css
Or ../includes/style.css.
Try to use the absolute path and change it to a relative one.