Circle C
2013-03-10 23:23:38 UTC
I've now started moving things onto an actual server, so I'm chopping up my test pages into chunks so I can PHP them all together.
My main page works fine; it displays just the way I wanted it, being able to correctly find and use all the files it requires.
So next I'm trying to set up another page located in a subdirectory to make sure I'm using the proper formats and stuff so that it will grab all the same files and build a page with the same design but separate content.
Just to start off, I copy the same file I have for my index.php in the root directory, but change the filler text to state the name of the page.
But when I access that file, I instead am just looking at the main page. The unique text I wrote into that page never appears.
The URL listed in my browser is correct, which labels a specific php file in a specific directory, but the content of the page is exactly my index.php in my root directory. I know it is trying to access that directory because if I change the .css file mentioned in my includes so that it looks in the current directory (instead of directly specifying the root) it finds nothing and no style is applied.
In fact, I see this for every page I try to access, including ones that were just sent to empty directories.
There seems to be clearly something I don't get about PHP. Why is it not building the page I specified? I originally thought I would get an error because it couldn't find the include file, since I didn't specify a directory, but I guess it makes sense that the server would look in the root directory instead of the current directory. But I certainly don't get why this is happening.