Hi all,
I want to be able to include files through a class. Here's a stripped down version of the class I've got going to give you an idea of what I'm trying to achieve:
But this isn't working. Nothing happens.Code:class mm3 { // getCSS() - Returns standard CSS files depending on page/version. public function getCSS($page, $version){ switch($page){ case "inventory": include mmPHPPath.'includes/css-inventory.php'; default: return false; } } }
mmPHPPath is a constant. If I changed "include" to "echo", the correct PHP path to the file is shown. If I change mmPHPPath to mmInvURL (another constant), then I get a path that if pasted into the browser also brings up the correct file. So I know it's pointing to the right place, but I'm not getting a result.
If I use "require" the script halts, but if I use "include" with a try...catch block the catch statements don't execute.
Blarg!Thanks for any help.



Thanks for any help.
Reply With Quote


Bookmarks