Adding Extended Folders to Smarty, Referencing one setup.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Adding Extended Folders to Smarty, Referencing one setup.

Post by NewfieBilko »

Hey guys.. Using smarty.. I have all my setup files in the /root, if i wanted to make say an admin section, seperate from the root, say in folder root/admin, and had files in there, how can i reference the setup.php in the precending folder, without Smarty going through the application thinking that the Admin/File isn't in the root..

I say in my /admin/admin.php:

PHP:

<?php
require_once '../setup.php';
?>

And it will take the file, and go ahead and load the classes under it, but when it gets to a reference of say /Smarty/SmartyCompliair.class it thinks that my admin.php is in its /admin/ so all setup files (smartycompalir) should be in that directory root as well, but there not, there in /smarty/, not /admin/ so i get this error hur:


Failed opening required 'Smarty/Smarty_Compiler.class.php' (include_path='.:/usr/share/pear') in /var/www/php2/Smarty/Smarty.class.php on line 1009
Post Reply