I have set up a folder under my localhost with the following files/folders:
Folder: OrcaTools
File: index.php (primary php)
File: about.php (the about page php)
Folder: OrcaTools/includes
File: orcatools.inc (defines, other vars + global functions)
File: template.inc (functions specific to several pages)
Folder: OrcaTools/templates
File: orcatools.tpl (template for home page - all other templates fit in a content div in this)
File: about.tpl (template for about page content)
File: orcatools.css (css file for orcatools.tpl - and for all other templates in the content div)
orcatools.tpl has a line that links to orcatools.css:
Code: Select all
<link rel="stylesheet" href="templates/orcatools.css" type="text/css" media='screen' />index.php creates a new orcatoolsTemplate, sets some vars & calls the showOrcaTools function in template.inc, which then calls orcatools.tpl to display the home page.
The home page has an About button, which calls about.php, which reads it's template about.tpl.
And this works exactly as I want it to.
The problem occurs when I try to put about.php in it's own subfolder OrcaTools/About.
I change the following in the relocated login.php:
Code: Select all
require_once "includes/orcatools.inc";
require_once "includes/template.inc";
require_once "includes/validate.inc";
Code: Select all
require_once "../includes/validate.inc";
require_once "../includes/orcatools.inc";
require_once "../includes/template.inc";
When the about page appears, I see the text from the about.php, but in a linear form, not the styled display.
I've used the "../" to indicate that the reference is from the root rather then directly to the current folder.
So what's happening here - what am I doing wrong?