Im trying to change my site to use subfolders. At the moment i have all the pages, CSS and a header.php in the root. Now i have:
header.php
footer.php
index.php
css.css
products/page1.php
products/page2.php
products/page3.php
etc
The include works from index.php, but not from page1.php I understand that this is because from page2 its looking for the header.php in the products/ folder, but i dont know how to fix it. Ive tried
Well, you aren't entirely true. Not ready - correct, but it is much better than you claim. My buddy whos not a techie and not married to elon or tesla has gotten FSD trials a few times since owning his Y and his biggest complaint is that the FSD isn't aggressive enough to compete with Houston texas drivers and that makes him feel like he might get into a wreck where I argued less agressive and more cautious is a good thing.
I think we are around 10 years away from it being a common thing like flying. Waymo by Google is really good. Tesla likely isnt far behind and has more data they are feeding their AI because it comes off every tesla owned and driven and connected to the owners home wifi network.
Question
Bollard
Hey.
Im trying to change my site to use subfolders. At the moment i have all the pages, CSS and a header.php in the root. Now i have:
header.php
footer.php
index.php
css.css
products/page1.php
products/page2.php
products/page3.php
etc
The include works from index.php, but not from page1.php I understand that this is because from page2 its looking for the header.php in the products/ folder, but i dont know how to fix it. Ive tried
<?php include ('../header.php'); ?>
And that didnt work.
Any ideas would be greatly appreciated.
Link to comment
https://www.neowin.net/forum/topic/626575-php-includes-with-sub-folders-how/Share on other sites
8 answers to this question
Recommended Posts