Closed cythral closed 8 years ago
This broke the home page, but everything else seems to work. I am about to add an exception for that page, as it is a special case.
The home page issue has been fixed in commit adfc7fdd98610a474cd0230a595fae43f5d607f2. Thank you for your code!
Good deal, I'll take a look at your other files, its a good dispatcher. I've made a similar one that dispatches multiple websites. Makes life easy doesnt it?
Yeah. I had trouble making the URLs and includes work the way I wanted before, and the dispatcher has made it much easier to do that, since I can control exactly how URLs are handled by the server.
Don't load a file into memory using file_get_contents if you're just going to echo it. Use readfile to directly output contents to the output buffer without touching the memory. also it looks better (less typing). Also fixed a couple messy areas such as retrieving the page info and outputting the content type for png/svg files. Avoid switch statements wherever possible.