I am structuring a little handful of PHP pages for an assignment.
I'm currently working with includes, and creating master templates for particular pages.
This is where it gets difficult for me to explain.
I want to create 3 different types of master template, and I want to display 2 instances of each type. In my master templates, I am calling various includes from all around my file system, and they work perfectly... on the first instance which is the folder's index page.
Now, I create a folder alongside the main index page and create in this new folder, its own index page. I do this because I don't want the URL to end with the file extension in the browser.
I want these two index pages - a level apart - to be 2 instances of 1 master template.
The problem is that now that these 2 files are a folder apart, the master template won't work. Not because it's being called incorrectly, but because all the includes within the master template are being called incorrectly.
The quick and easy fix would be to abandon the folder and just put up with the file extension, but I don't want to do that. Plus, if there's a way of getting around this, it would be helpful to learn anyway.
I was wondering if there was a way I could run a program to find includes and put a ../ on the front or something... I don't know much about PHP.
Thanks in advance!